linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	kernel-team@android.com, Guenter Roeck <linux@roeck-us.net>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [PATCH] irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry
Date: Thu, 08 Jul 2021 17:39:28 +0100	[thread overview]
Message-ID: <87eec83glb.wl-maz@kernel.org> (raw)
In-Reply-To: <20210708094608.anrgynyzu6h233pr@mobilestation>

Hi Sergey,

On Thu, 08 Jul 2021 10:46:08 +0100,
Serge Semin <fancer.lancer@gmail.com> wrote:
> 
> Hi Marc,
> Thanks for the fix.
> 
> On Tue, Jul 06, 2021 at 12:06:47PM +0100, Marc Zyngier wrote:
> > Since d4a45c68dc81 ("irqdomain: Protect the linear revmap with RCU"),
> > any irqdomain lookup requires the RCU read lock to be held.
> > 
> > This assumes that the architecture code will be structured such as
> > irq_enter() will be called *before* the interrupt is looked up
> > in the irq domain. However, this isn't the case for MIPS, and a number
> > of drivers are structured to do it the other way around when handling
> > an interrupt in their root irqchip (secondary irqchips are OK by
> > construction).
> > 
> > This results in a RCU splat on a lockdep-enabled kernel when the kernel
> > takes an interrupt from idle, as reported by Guenter Roeck.
> 
> Alas I am still on 5.12-rc4, so can't test it out at the moment. Soon
> after getting further on the modern kernel version I'll give this
> patch a try on my hw and send a report.

It is likely that I'll send a pull request to Thomas with this
shortly, given that it affects existing systems and that this patch
does address the issue (see Guenter's report). We can always amend
things once you've had the time to upgrade your kernel to the latest.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2021-07-08 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 11:06 [PATCH] irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry Marc Zyngier
2021-07-08  9:46 ` Serge Semin
2021-07-08 16:39   ` Marc Zyngier [this message]
2021-07-08 19:41     ` Serge Semin

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=87eec83glb.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /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;
as well as URLs for NNTP newsgroup(s).