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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

----

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux