Files
linux/kernel/sched
Tejun Heo cd6aab7367 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>
2026-05-10 10:08:16 -10:00
..
2025-06-11 11:20:53 +02:00
2025-06-11 11:20:53 +02:00
2025-06-13 08:47:18 +02:00
2026-03-06 07:58:02 -10:00
2025-07-14 17:16:28 +02:00
2026-01-11 06:09:11 -10:00
2025-06-11 11:20:53 +02:00
2025-06-11 11:20:53 +02:00
2026-01-31 16:16:06 -08:00
2025-06-11 11:20:53 +02:00
2025-06-11 11:20:53 +02:00