IRQs without IRQF_DISABLED could nest to arbitrary level. At worst this would mean having as many IRQ handlers stack frames, as there are interrupts registered --- enough to cause a stack overflow. This patch makes a limit to have at most two handlers on the stack. Signed-off-by: Mikulas Patocka Index: linux-2.6.26-rc5-devel/include/linux/interrupt.h =================================================================== --- linux-2.6.26-rc5-devel.orig/include/linux/interrupt.h 2008-06-20 23:34:04.000000000 +0200 +++ linux-2.6.26-rc5-devel/include/linux/interrupt.h 2008-06-20 23:36:03.000000000 +0200 @@ -95,7 +95,7 @@ #ifdef CONFIG_LOCKDEP # define local_irq_enable_in_hardirq() do { } while (0) #else -# define local_irq_enable_in_hardirq() local_irq_enable() +# define local_irq_enable_in_hardirq() do { if (hardirq_count() <= (1 << HARDIRQ_SHIFT)) local_irq_enable(); } while (0) #endif extern void disable_irq_nosync(unsigned int irq);