aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
diff options
context:
space:
mode:
authorMel Gorman <[email protected]>2021-09-27 11:46:35 +0000
committerPeter Zijlstra <[email protected]>2021-10-01 11:57:57 +0000
commit703066188f63d66cc6b9d678e5b5ef1213c5938e (patch)
tree28aece1cc7321f64178cc175a92a47ecc27833c7 /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
parentsched/fair: Add ancestors of unthrottled undecayed cfs_rq (diff)
downloadkernel-703066188f63d66cc6b9d678e5b5ef1213c5938e.tar.gz
kernel-703066188f63d66cc6b9d678e5b5ef1213c5938e.zip
sched/fair: Null terminate buffer when updating tunable_scaling
This patch null-terminates the temporary buffer in sched_scaling_write() so kstrtouint() does not return failure and checks the value is valid. Before: $ cat /sys/kernel/debug/sched/tunable_scaling 1 $ echo 0 > /sys/kernel/debug/sched/tunable_scaling -bash: echo: write error: Invalid argument $ cat /sys/kernel/debug/sched/tunable_scaling 1 After: $ cat /sys/kernel/debug/sched/tunable_scaling 1 $ echo 0 > /sys/kernel/debug/sched/tunable_scaling $ cat /sys/kernel/debug/sched/tunable_scaling 0 $ echo 3 > /sys/kernel/debug/sched/tunable_scaling -bash: echo: write error: Invalid argument Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs") Signed-off-by: Mel Gorman <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
0 files changed, 0 insertions, 0 deletions