summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-04-25 03:31:35 +0300
committerTejun Heo <tj@kernel.org>2026-04-25 03:31:35 +0300
commit411d3ef1a70589755e3beed2f5bf1f8aa0c27d1a (patch)
tree590aa364c20e5b794751e98b50490ba36f3efd89 /include/linux/stackprotector.h
parentbd2d76455b65aab77652823919db128a8e585825 (diff)
downloadlinux-411d3ef1a70589755e3beed2f5bf1f8aa0c27d1a.tar.xz
sched_ext: Unregister sub_kset on scheduler disable
When ops.sub_attach is set, scx_alloc_and_add_sched() creates sub_kset as a child of &sch->kobj, which pins the parent with its own reference. The disable paths never call kset_unregister(), so the final kobject_put() in bpf_scx_unreg() leaves a stale reference and scx_kobj_release() never runs, leaking the whole struct scx_sched on every load/unload cycle. Unregister sub_kset in scx_root_disable() and scx_sub_disable() before kobject_del(&sch->kobj). Fixes: ebeca1f930ea ("sched_ext: Introduce cgroup sub-sched support") Reported-by: Chris Mason <clm@meta.com> Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions