]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0221c5a144576f46f8999bd6446729efac6b51ce
tree652e30a6fcebe62430b643891f8a1cd2b31396eb
parentcd0ebb7cb35ef99812acfdce1ba7ec9af8374865
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