public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Peng Liu <iwtbavbm@gmail.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: gregkh@linuxfoundation.org, maz@kernel.org,
	vincent.whitchurch@axis.com, iwtbavbm@gmail.com,
	158710936@qq.com
Subject: Re: [PATCH] genirq: Keep handle_nested_irq() from touching desc->threads_active
Date: Mon, 10 Jun 2024 20:23:09 +0200	[thread overview]
Message-ID: <877cewwtbm.ffs@tglx> (raw)
In-Reply-To: <20240609183046.GA14050@iZj6chx1xj0e0buvshuecpZ>

On Mon, Jun 10 2024 at 02:30, Peng Liu wrote:
> handle_nested_irq() is supposed to be running inside the parent thread
> handler context. It per se has no dedicated kernel thread, thus shouldn't
> touch desc->threads_active. The parent kernel thread has already taken
> care of this.

No it has not. The parent thread has marked itself in the parent threads
interrupt descriptor.

How does that help synchronizing the nested interrupt, which has a
separate interrupt descriptor?

> Fixes: e2c12739ccf7 ("genirq: Prevent nested thread vs synchronize_hardirq() deadlock")
> Cc: stable@vger.kernel.org

There is nothing to fix.

> Signed-off-by: Peng Liu <iwtbavbm@gmail.com>
> ---
>
> Despite of its correctness, I'm afraid the testing on my only PC can't
> cover the affected code path. So the patch may be totally -UNTESTED-.

Which correctness?

The change log of the commit you want to "fix" says:

    Remove the incorrect usage in the nested threaded interrupt case and
    instead re-use the threads_active / wait_for_threads mechanism to
    wait for nested threaded interrupts to complete.

It's very clearly spelled out, no?

Thanks,

        tglx

  reply	other threads:[~2024-06-10 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-09 18:30 [PATCH] genirq: Keep handle_nested_irq() from touching desc->threads_active Peng Liu
2024-06-10 18:23 ` Thomas Gleixner [this message]
2024-06-11 13:19   ` Peng Liu

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=877cewwtbm.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=158710936@qq.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iwtbavbm@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vincent.whitchurch@axis.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