genirq: Prevent resend to interrupts marked IRQ_NESTED_THREAD
authorThomas Gleixner <tglx@linutronix.de>
Thu, 16 Jul 2015 12:10:17 +0000 (14:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:20:30 +0000 (12:20 -0700)
commitdcc2305a489922a4fff7072bc811492f0fa5b2ed
treea8c464e23286884d2455f603ec0a6f6c08ae8beb
parent508a750fe6cc950bad1cca07f1637ce4815b5420
genirq: Prevent resend to interrupts marked IRQ_NESTED_THREAD

commit 75a06189fc508a2acf470b0b12710362ffb2c4b1 upstream.

The resend mechanism happily calls the interrupt handler of interrupts
which are marked IRQ_NESTED_THREAD from softirq context. This can
result in crashes because the interrupt handler is not the proper way
to invoke the device handlers. They must be invoked via
handle_nested_irq.

Prevent the resend even if the interrupt has no valid parent irq
set. Its better to have a lost interrupt than a crashing machine.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/irq/resend.c