]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - kernel/irq/chip.c
genirq: Fix chained interrupt data ordering
authorThomas Gleixner <tglx@linutronix.de>
Thu, 11 May 2017 11:54:11 +0000 (13:54 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 16 May 2017 13:03:26 +0000 (15:03 +0200)
commit2c4569ca26986d18243f282dd727da27e9adae4c
tree652e30a6fcebe62430b643891f8a1cd2b31396eb
parent9459a04b6a5a09967eec94a1b66f0a74312819d9
genirq: Fix chained interrupt data ordering

irq_set_chained_handler_and_data() sets up the chained interrupt and then
stores the handler data.

That's racy against an immediate interrupt which gets handled before the
store of the handler data happened. The handler will dereference a NULL
pointer and crash.

Cure it by storing handler data before installing the chained handler.

Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
kernel/irq/chip.c