genirq: Run irq handlers with interrupts disabled
authorIngo Molnar <mingo@elte.hu>
Fri, 26 Mar 2010 00:06:51 +0000 (00:06 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Apr 2010 14:36:40 +0000 (16:36 +0200)
Running interrupt handlers with interrupts enabled can cause stack
overflows. That has been observed with multiqueue NICs delivering all
their interrupts to a single core. We might band aid that somehow by
checking the interrupt stacks, but the real safe fix is to run the irq
handlers with interrupts disabled.

Drivers for whacky hardware still can reenable them in the handler
itself, if the need arises. (They do already due to lockdep)

The risk of doing this is rather low:

 - lockdep already enforces this
 - CONFIG_NOHZ has shaken out the drivers which relied on jiffies updates
 - time keeping is not longer sensitive to the timer interrupt being delayed

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Linus Torvalds <torvalds@osdl.org>
LKML-Reference: <20100326000405.758579387@linutronix.de>

kernel/irq/handle.c

index 76d5a671bfe1a3db5fd7bb0d2cb4f8b992a3c485..27e5c69112235c2f0cebe18981bb1f5504ed6807 100644 (file)
@@ -370,9 +370,6 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
        irqreturn_t ret, retval = IRQ_NONE;
        unsigned int status = 0;
 
-       if (!(action->flags & IRQF_DISABLED))
-               local_irq_enable_in_hardirq();
-
        do {
                trace_irq_handler_entry(irq, action);
                ret = action->handler(irq, action->dev_id);