Skip to content

Commit efeeaac

Browse files
committed
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: bff3b5a ("sched_ext: Move disable machinery into scx_sched") Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 54e9625 commit efeeaac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/sched/ext.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,7 +3471,9 @@ static void scx_sched_free_rcu_work(struct work_struct *work)
34713471
struct scx_dispatch_q *dsq;
34723472
int node;
34733473

3474+
irq_work_sync(&sch->error_irq_work);
34743475
kthread_stop(sch->helper->task);
3476+
34753477
free_percpu(sch->pcpu);
34763478

34773479
for_each_node_state(node, N_POSSIBLE)

0 commit comments

Comments
 (0)