All of lore.kernel.org
 help / color / mirror / Atom feed
From: Serge Semin <fancer.lancer@gmail.com>
To: Marc Zyngier <maz@kernel.org>
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, 8 Jul 2021 22:41:47 +0300	[thread overview]
Message-ID: <20210708194147.a236rqwybgsugwe4@mobilestation> (raw)
In-Reply-To: <87eec83glb.wl-maz@kernel.org>

On Thu, Jul 08, 2021 at 05:39:28PM +0100, Marc Zyngier wrote:
> 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.

Ok. I'll report the test status once my working branches are rebased on the
latest version. It will be done in a few weeks from now then after I
finished my current activity.

-Sergey

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

      reply	other threads:[~2021-07-08 19:41 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
2021-07-08 19:41     ` Serge Semin [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=20210708194147.a236rqwybgsugwe4@mobilestation \
    --to=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=maz@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.