Re: [PATCH] irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry
From: Serge Semin <hidden>
Date: 2021-07-08 19:41:54
Also in:
lkml
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 [off-list ref] wrote:quoted
Hi Marc, Thanks for the fix. On Tue, Jul 06, 2021 at 12:06:47PM +0100, Marc Zyngier wrote:quoted
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.