genirq: Robustify handle_percpu_devid_irq()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 2 Sep 2016 12:45:19 +0000 (14:45 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 2 Sep 2016 16:06:49 +0000 (18:06 +0200)
commitfc590c22f9f056ab50190b797f6cacead29f9b75
tree87719f60da441d05d0ea7f16fb3ba4d926491f5f
parenteb0dc47ab6810c432e8193beccd9905ba0db8b22
genirq: Robustify handle_percpu_devid_irq()

The percpu_devid handler is not robust against spurious interrupts. If a
spurious interrupt happens and no action is installed then the handler
crashes with a NULL pointer dereference.

Add a sanity check for this and log the wreckage once in dmesg.

Reported-by: Majun <majun258@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: guohanjun@huawei.com
Cc: dingtianhong@huawei.com
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1609021436160.5647@nanos
kernel/irq/chip.c