Messages in this thread | | | Date | Wed, 15 Apr 2009 12:17:38 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH 1/4] irq: correct CPUMASKS_OFFSTACK typo -v2 |
| |
On Wed, 15 Apr 2009 12:01:05 +0200 Ingo Molnar <mingo@elte.hu> wrote:
> > * Andrew Morton <akpm@linux-foundation.org> wrote: > > > On Tue, 14 Apr 2009 13:41:55 -0700 > > Yinghai Lu <yinghai@kernel.org> wrote: > > > > > irq > > > > Speaking of which, could someone please take a look at > > http://www.gossamer-threads.com/lists/linux/kernel/1060580?do=post_view_threaded#1060580 > > ? > [...] > > > But try_one_irq() is running tifm_7xx1_isr() with local interrupts > > enabled, which upsets lockdep. > > It doesnt just upset lockdep, it could also cause real lockups.
Only if the interrupt were to magically come back to life, then trigger. I think. Possibly in the case of shared interrupts we'd lock up because of an interrupt from another device.
> Lockdep is just the canary, the lockup is the methane explosion. > > > But I suspect that the code as it stands is non-buggy. Unless the > > interrupt can magically come back to life. In which case any > > change we make is purely a make-lockdep-shut-up thing. > > Hm, i'd suggest we go for the methane leak instead of squashing the > canary. Which in this case would be try_one_irq() ignoring > IRQF_DISABLED or so? Affecting (much) more ISRs than just > tifm_7xx1_isr()?
tifm_7xx1_isr() is requested with bare IRQF_SHARED, so that function is supposed to be called with local interrupts enabled.
And indeed, try_one_irq() is calling it with local interrupts enabled. That gets lockdep upset. I assume there's magic in lockdep somewhere which recognises the case where a function is called in hard irq context with local interrupts enabled and, knowing that the controller won't generate another interrupt, treats this as local-interrupt-disabled. Or something.
I don't know how to fix this really. We _could_ fudge it by disabling local interrupts in try_one_irq(). But the ISR could legitimately do (say) spin_unlock_irq() and muck everything up.
| |