Commit e08d007
Peter Zijlstra
sched/debug: Fix avg_vruntime() usage
John reported that stress-ng-yield could make his machine unhappy and
managed to bisect it to commit b3d99f4 ("sched/fair: Fix
zero_vruntime tracking").
The commit in question changes avg_vruntime() from a function that is
a pure reader, to a function that updates variables. This turns an
unlocked sched/debug usage of this function from a minor mistake into
a data corruptor.
Fixes: af4cf40 ("sched/fair: Add cfs_rq::avg_vruntime")
Fixes: b3d99f4 ("sched/fair: Fix zero_vruntime tracking")
Reported-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: John Stultz <jstultz@google.com>
Link: https://patch.msgid.link/20260401132355.196370805@infradead.org1 parent 1319ea5 commit e08d007
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
| 905 | + | |
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
| |||
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
| 929 | + | |
928 | 930 | | |
929 | 931 | | |
930 | 932 | | |
| |||
934 | 936 | | |
935 | 937 | | |
936 | 938 | | |
937 | | - | |
| 939 | + | |
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
| |||
0 commit comments