Skip to contentSkip to conversation

warn if free_irq() is called from IRQ context

PATCH New Ingo Molnar 1 participant 1 message Jan 26, 2006 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 warn if free_irq() is called from IRQ context

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

----

 kernel/irq/manage.c |    1 +
 1 files changed, 1 insertion(+)
kernel/irq/manage.c +1 -0
Index: 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;