diff options
| author | Tejun Heo <tj@kernel.org> | 2025-10-09 13:56:23 -1000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-02 22:18:02 +0900 |
| commit | 60407ac17238a802c79978ddae9e9f6a84b53026 (patch) | |
| tree | 0cba32e343cdd3710436257815937212f5c84f58 /kernel | |
| parent | 733d0e11840efae81a26adfa4b3ec8e95fb7f718 (diff) | |
| download | linux-60407ac17238a802c79978ddae9e9f6a84b53026.tar.gz linux-60407ac17238a802c79978ddae9e9f6a84b53026.tar.bz2 linux-60407ac17238a802c79978ddae9e9f6a84b53026.zip | |
sched_ext: Sync error_irq_work before freeing scx_sched
[ Upstream commit efeeaac9ae9763f9c953e69633c86bc3031e39b5 ]
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: bff3b5aec1b7 ("sched_ext: Move disable machinery into scx_sched")
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/ext.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 46029050b170..f89894476e51 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3537,7 +3537,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) |
