diff options
| author | Tejun Heo <tj@kernel.org> | 2026-03-15 19:43:28 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-03-15 23:27:04 -1000 |
| commit | 618a9db0158b1c51fd33822cf804f5a09f829837 (patch) | |
| tree | d32501b90bc0f9b2df42c518c63f435eb37b77ff /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | 0c66b0da006415880444ec821e3cb66a89273865 (diff) | |
sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched()
kobject_init_and_add() failure requires kobject_put() for proper cleanup, but
the error paths were using kfree(sch) possibly leaking the kobject name. The
kset_create_and_add() failure was already using kobject_put() correctly.
Switch the kobject_init_and_add() error paths to use kobject_put(). As the
release path puts the cgroup ref, make scx_alloc_and_add_sched() always
consume @cgrp via a new err_put_cgrp label at the bottom of the error chain
and update scx_sub_enable_workfn() accordingly.
Fixes: 17108735b47d ("sched_ext: Use dynamic allocation for scx_sched")
Reported-by: David Carlier <devnexen@gmail.com>
Link: https://lore.kernel.org/r/20260314134457.46216-1-devnexen@gmail.com
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
