public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* irq_set_chained_handler() called too early for hwirq to be initialized
@ 2012-10-28 15:56 Roland Stigge
  2012-10-28 17:34 ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Stigge @ 2012-10-28 15:56 UTC (permalink / raw)
  To: linux-arm-kernel@lists.infradead.org
  Cc: linux-kernel@vger.kernel.org, tglx, paul.gortmaker, benh

Hi,

consider arch/arm/mach-lpc32xx/irq.c: irq_set_chained_handler() is
called at a point where it accesses
irq_to_desc(IRQ_LPC32XX_SUB2IRQ)->irq_data.hwirq but which is not yet
initialized.

(This bug just surfaced on lpc32xx when the chained interrupt controller
SIC2 wasn't working. SIC1 does, but just by chance: The uninitialized
value 0 is just coincidentally the correct one.)

...->hwirq is actually defined only later on in lpc32xx_init_irq() at
irq_domain_add_legacy(). Ideally, I would just move the
irq_set_chained_handler() calls to after of_irq_init() and
irq_domain_add_legacy(). Is this OK or does this produce any race condition?

Thanks in advance,

Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-28 18:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-28 15:56 irq_set_chained_handler() called too early for hwirq to be initialized Roland Stigge
2012-10-28 17:34 ` Thomas Gleixner
2012-10-28 18:36   ` Roland Stigge
2012-10-28 18:46     ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox