1
0

sched_ext: Sync error_irq_work before freeing scx_sched

By the time scx_sched_free_rcu_work() runs, the scx_sched is no longer
reachable. However, a previously queued error_irq_work may still be pending or
running. Ensure it completes before proceeding with teardown.

Fixes: bff3b5aec1 ("sched_ext: Move disable machinery into scx_sched")
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Tejun Heo
2025-10-09 13:56:23 -10:00
parent 54e96258a6
commit efeeaac9ae

View File

@@ -3471,7 +3471,9 @@ static void scx_sched_free_rcu_work(struct work_struct *work)
struct scx_dispatch_q *dsq;
int node;
irq_work_sync(&sch->error_irq_work);
kthread_stop(sch->helper->task);
free_percpu(sch->pcpu);
for_each_node_state(node, N_POSSIBLE)