]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Add protection against unsafe usage of generic_handle_irq()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 6 Mar 2020 13:03:43 +0000 (14:03 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 8 Mar 2020 10:06:40 +0000 (11:06 +0100)
commitb2400c785c0822dee4adb8f7ceee79b155e5128d
treeb1862c5ad099bf0324e042dd2984f6730795472a
parentc14c1d7ba48a7eb5a7d633110cffb498d5abdcce
genirq: Add protection against unsafe usage of generic_handle_irq()

In general calling generic_handle_irq() with interrupts disabled from non
interrupt context is harmless. For some interrupt controllers like the x86
trainwrecks this is outright dangerous as it might corrupt state if an
interrupt affinity change is pending.

Add infrastructure which allows to mark interrupts as unsafe and catch such
usage in generic_handle_irq().

Reported-by: sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lkml.kernel.org/r/20200306130623.590923677@linutronix.de
include/linux/irq.h
kernel/irq/internals.h
kernel/irq/irqdesc.c
kernel/irq/resend.c