Skip to contentSkip to conversation

Don't synchronize in disable_irq() if no handler

PATCH New Paul Mackerras 1 participant 1 message Jun 3, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't synchronize in disable_irq() if no handler

This patch is the ppc32 counterpart to a fix that went into arch/i386/kernel/irq.c last October. The bug was noted by Al Viro: if no handler exists, and we have IRQ_INPROGRESS set because of an earlier irq that got through, synchronize_irq() will end up waiting forever.

arch/ppc/kernel/irq.c +3 -1
diff -urN linux-2.5/arch/ppc/kernel/irq.c pmac-2.5/arch/ppc/kernel/irq.c
@@ -304,8 +304,10 @@
 
 void disable_irq(unsigned int irq)
 {
+	irq_desc_t *desc = irq_desc + irq;
 	disable_irq_nosync(irq);
-	synchronize_irq(irq);
+	if (desc->action)
+		synchronize_irq(irq);
 }
 
 /**