]> 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)
commit8b0db4242d373e54b1fb651298d2d568061efcd1
treeb1862c5ad099bf0324e042dd2984f6730795472a
parent3ff4a143b111d54d970f8fcef19024932935fe87
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