[patch] warn if free_irq() is called from IRQ context

From: Ingo Molnar
Date: Thu Jan 26 2006 - 11:31:22 EST


warn if free_irq() is called in IRQ context - free_irq() can execute
/proc VFS work, which must not be done in IRQ context.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

----

kernel/irq/manage.c | 1 +
1 files changed, 1 insertion(+)

Index: linux/kernel/irq/manage.c
===================================================================
--- linux.orig/kernel/irq/manage.c
+++ linux/kernel/irq/manage.c
@@ -263,6 +263,7 @@ void free_irq(unsigned int irq, void *de
unsigned long flags;
irqreturn_t (*handler)(int, void *, struct pt_regs *) = NULL;

+ WARN_ON(in_interrupt());
if (irq >= NR_IRQS)
return;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/