]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/sched_ext: scx_central: fix CPU_SET and skeleton leak on early exit
authorDavid Carlier <devnexen@gmail.com>
Tue, 17 Feb 2026 19:48:00 +0000 (19:48 +0000)
committerTejun Heo <tj@kernel.org>
Wed, 18 Feb 2026 17:03:50 +0000 (07:03 -1000)
commit55a24d9203979d1cd0196ba1d189860e8b828c2e
tree921f3cf072b6a4b6d8bb78d7fd079e91265a68bb
parent07676846132340c7d0f50eca189a24cea4ae3cd8
tools/sched_ext: scx_central: fix CPU_SET and skeleton leak on early exit

Use CPU_SET_S() instead of CPU_SET() on the dynamically allocated
cpuset to avoid a potential out-of-bounds write when nr_cpu_ids
exceeds CPU_SETSIZE.

Also destroy the skeleton before returning on invalid central CPU ID
to prevent a resource leak.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/scx_central.c