diff options
| author | Tejun Heo <tj@kernel.org> | 2026-03-10 07:12:21 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-03-10 07:12:21 -1000 |
| commit | f4a6c506d11823e7123bc6573fbd8e432245acf4 (patch) | |
| tree | 6532d15e574bb9689a5a6b694747dd5b509a64fd /tools/perf/scripts/python | |
| parent | b5bc043505fed4198158037938ead78557eb79ab (diff) | |
sched_ext: Always bounce scx_disable() through irq_work
scx_disable() directly called kthread_queue_work() which can acquire
worker->lock, pi_lock and rq->__lock. This made scx_disable() unsafe to
call while holding locks that conflict with this chain - in particular,
scx_claim_exit() calls scx_disable() for each descendant while holding
scx_sched_lock, which nests inside rq->__lock in scx_bypass().
The error path (scx_vexit()) was already bouncing through irq_work to
avoid this issue. Generalize the pattern to all scx_disable() calls by
always going through irq_work. irq_work_queue() is lockless and safe to
call from any context, and the actual kthread_queue_work() call happens
in the irq_work handler outside any locks.
Rename error_irq_work to disable_irq_work to reflect the broader usage.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
