public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Zqiang <qiang.zhang@linux.dev>
Cc: void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: Fix possible deadlock in the deferred_irq_workfn()
Date: Thu, 13 Nov 2025 08:32:23 -1000	[thread overview]
Message-ID: <001184f0619f11ba3dc767e237ba99a5@kernel.org> (raw)
In-Reply-To: <20251113114355.24572-1-qiang.zhang@linux.dev>

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@linux.dev>

Applied to sched_ext/for-6.18-fixes.

Thanks.

--
tejun

      reply	other threads:[~2025-11-13 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 11:43 [PATCH] sched_ext: Fix possible deadlock in the deferred_irq_workfn() Zqiang
2025-11-13 18:32 ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=001184f0619f11ba3dc767e237ba99a5@kernel.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qiang.zhang@linux.dev \
    --cc=sched-ext@lists.linux.dev \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox