From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: [patch 1/2] genirq: Run irq handlers with interrupts disabled Date: Fri, 26 Mar 2010 00:06:51 -0000 Message-ID: <20100326000405.758579387@linutronix.de> References: <20100326000325.917127328@linutronix.de> Return-path: Received: from www.tglx.de ([62.245.132.106]:58661 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752635Ab0CZAHo (ORCPT ); Thu, 25 Mar 2010 20:07:44 -0400 Content-Disposition: inline; filename=genirq-run-handlers-with-irqs-disabled.patch Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: LKML , linux-arch@vger.kernel.org, Andrew Morton , Ingo Molnar , Peter Zijlstra , Alan Cox , Andi Kleen , David Miller , Greg Kroah-Hartman , Arnaldo Carvalho de Melo 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 Signed-off-by: Thomas Gleixner --- kernel/irq/handle.c | 3 --- 1 file changed, 3 deletions(-) Index: linux-2.6/kernel/irq/handle.c =================================================================== --- linux-2.6.orig/kernel/irq/handle.c +++ linux-2.6/kernel/irq/handle.c @@ -370,9 +370,6 @@ irqreturn_t handle_IRQ_event(unsigned in 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);