Commit 600b437
sched_ext: Fix possible deadlock in the deferred_irq_workfn()
[ Upstream commit a257e97 ]
For PREEMPT_RT=y kernels, the deferred_irq_workfn() is executed in
the per-cpu irq_work/* task context and not disable-irq, if the rq
returned by container_of() is current CPU's rq, the following scenarios
may occur:
lock(&rq->__lock);
<Interrupt>
lock(&rq->__lock);
This commit use IRQ_WORK_INIT_HARD() to replace init_irq_work() to
initialize rq->scx.deferred_irq_work, make the deferred_irq_workfn()
is always invoked in hard-irq context.
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 78ccf51 commit 600b437
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5377 | 5377 | | |
5378 | 5378 | | |
5379 | 5379 | | |
5380 | | - | |
| 5380 | + | |
5381 | 5381 | | |
5382 | 5382 | | |
5383 | 5383 | | |
| |||
0 commit comments