Re: [PATCH] sched_ext: Fix possible deadlock in the deferred_irq_workfn()
From: Tejun Heo
Date: Thu Nov 13 2025 - 13:32:24 EST
On Thu, Nov 13, 2025 at 07:43:55PM +0800, Zqiang wrote:
> 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@xxxxxxxxx>
Applied to sched_ext/for-6.18-fixes.
Thanks.
--
tejun