[PATCH] warn if free_irq() is called from IRQ context
authorIngo Molnar <mingo@elte.hu>
Sun, 26 Mar 2006 09:36:54 +0000 (01:36 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Mar 2006 16:56:53 +0000 (08:56 -0800)
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@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/irq/manage.c

index 6edfcef291e8202eb6173c28d267afa7851cf04e..ac766ad573e85e09c101ce0ebf7a2a595dc57a22 100644 (file)
@@ -271,6 +271,7 @@ void free_irq(unsigned int irq, void *dev_id)
        struct irqaction **p;
        unsigned long flags;
 
+       WARN_ON(in_interrupt());
        if (irq >= NR_IRQS)
                return;