[patch 2/2] genirq: Add reentrancy warning messages

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

 



The simple and level irq handlers prevent reentrancy. For those irq types
reentrancy should not happen. Instead of silently going back omit a warning
message. Also do not reenable the interrupt in that case.

Signed-off-by: Thomas Gleixner <[email protected]>

 kernel/irq/chip.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Index: linux-2.6.17-rc6-mm/kernel/irq/chip.c
===================================================================
--- linux-2.6.17-rc6-mm.orig/kernel/irq/chip.c	2006-06-10 10:32:49.000000000 +0200
+++ linux-2.6.17-rc6-mm/kernel/irq/chip.c	2006-06-10 10:42:40.000000000 +0200
@@ -208,8 +208,11 @@
 
 	spin_lock(&desc->lock);
 
-	if (unlikely(desc->status & IRQ_INPROGRESS))
+	if (unlikely(desc->status & IRQ_INPROGRESS)) {
+		printk(KERN_ERR "handle_simple_irq reentered while "
+		       "processing irq %d\n", irq);
 		goto out_unlock;
+	}
 	desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
 	kstat_cpu(cpu).irqs[irq]++;
 
@@ -251,8 +254,11 @@
 	spin_lock(&desc->lock);
 	mask_ack_irq(desc, irq);
 
-	if (unlikely(desc->status & IRQ_INPROGRESS))
+	if (unlikely(desc->status & IRQ_INPROGRESS)) {
+		printk(KERN_ERR "handle_level_irq reentered while "
+		       "processing irq %d\n", irq);
 		goto out;
+	}
 	desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
 	kstat_cpu(cpu).irqs[irq]++;
 
@@ -273,9 +279,9 @@
 
 	spin_lock(&desc->lock);
 	desc->status &= ~IRQ_INPROGRESS;
-out:
 	if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
 		desc->chip->unmask(irq);
+out:
 	spin_unlock(&desc->lock);
 }
 

--

-
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