Skip to content
Commit 0bf2d838 authored by Wang Yaxin's avatar Wang Yaxin Committed by Andrew Morton
Browse files

taskstats: fix struct taskstats breaks backward compatibility since version 15

Problem
========
commit 658eb5ab ("delayacct: add delay max to record delay peak")
  - adding more fields
commit f65c64f3 ("delayacct: add delay min to record delay peak")
  - adding more fields
commit b016d087 ("taskstats: modify taskstats version")
 - version bump to 15

Since version 15 (TASKSTATS_VERSION=15) the new layout of the structure
adds fields in the middle of the structure, rendering all old software
incompatible with newer kernels and software compiled against the new
kernel headers incompatible with older kernels.

Solution
=========
move delay max and delay min to the end of taskstat, and bump
the version to 16 after the change

[wang.yaxin@zte.com.cn: adjust indentation]
  Link: https://lkml.kernel.org/r/202505192131489882NSciXV4EGd8zzjLuwoOK@zte.com.cn
Link: https://lkml.kernel.org/r/20250510155413259V4JNRXxukdDgzsaL0Fo6a@zte.com.cn


Fixes: f65c64f3 ("delayacct: add delay min to record delay peak")
Signed-off-by: default avatarWang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: default avatarxu xin <xu.xin16@zte.com.cn>
Signed-off-by: default avatarKun Jiang <jiang.kun2@zte.com.cn>
Reviewed-by: default avatarYang Yang <yang.yang29@zte.com.cn>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 66f28ffb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment