aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/bpf-script-example.c
diff options
context:
space:
mode:
authorWaiman Long <[email protected]>2023-01-15 19:31:22 +0000
committerIngo Molnar <[email protected]>2023-01-16 09:07:25 +0000
commit5657c116783545fb49cd7004994c187128552b12 (patch)
tree4d8906a3c05a5b56455deccd6008a126e157684c /tools/perf/tests/bpf-script-example.c
parentsched/fair: Fixes for capacity inversion detection (diff)
downloadkernel-5657c116783545fb49cd7004994c187128552b12.tar.gz
kernel-5657c116783545fb49cd7004994c187128552b12.zip
sched/core: Fix NULL pointer access fault in sched_setaffinity() with non-SMP configs
The kernel commit 9a5418bc48ba ("sched/core: Use kfree_rcu() in do_set_cpus_allowed()") introduces a bug for kernels built with non-SMP configs. Calling sched_setaffinity() on such a uniprocessor kernel will cause cpumask_copy() to be called with a NULL pointer leading to general protection fault. This is not really a problem in real use cases as there aren't that many uniprocessor kernel configs in use and calling sched_setaffinity() on such a uniprocessor system doesn't make sense. Fix this problem by making sure cpumask_copy() will not be called in such a case. Fixes: 9a5418bc48ba ("sched/core: Use kfree_rcu() in do_set_cpus_allowed()") Reported-by: kernel test robot <[email protected]> Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/tests/bpf-script-example.c')
0 files changed, 0 insertions, 0 deletions