diff options
| author | Tejun Heo <tj@kernel.org> | 2026-05-10 23:08:16 +0300 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-10 23:08:16 +0300 |
| commit | cd6aab736702f981ac4d128e04a4e33105ea797d (patch) | |
| tree | 7010b10c763d14312d2e7c0739a64bf545e0c58e /tools/lib/python/kdoc/kdoc_parser.py | |
| parent | c941d7391f258d5d06e0f7e962a52f99a547a83e (diff) | |
| download | linux-cd6aab736702f981ac4d128e04a4e33105ea797d.tar.xz | |
sched_ext: Close sub-sched init race with post-init DEAD recheck
scx_sub_enable_workfn()'s init pass and scx_sub_disable() migration both
drop the rq lock to call __scx_init_task() against the other sched. A
TASK_DEAD @p can fall through sched_ext_dead() in that window.
sched_ext_dead() runs ops.exit_task() on the sched @p was attached to, not
on the sched whose init just completed, so the new allocation leaks.
Reuse the DEAD signal set by sched_ext_dead(). After __scx_init_task()
returns, take task_rq_lock(p) and check for DEAD; on hit, call
scx_sub_init_cancel_task() against the sub sched the init ran for and drop
@p; on miss, proceed as before.
Reported-by: zhidao su <suzhidao@xiaomi.com>
Link: https://lore.kernel.org/all/20260429133155.3825247-1-suzhidao@xiaomi.com/
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'tools/lib/python/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions
