From 35b6368a75ccbf34d588fb7c40b7d6aa544c129c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 12 Oct 2003 05:09:55 -0700 Subject: [PATCH] Clear IRQ_INPROGRESS as part of "enable_irq()". It can have gotten set by a stray interrupt if there were no handlers while the IRQ was disabled, and we shouldn't confuse other parts (ie this is another safety-net for the issues that Al Viro brought up about disable_irq() deadlocks when no handlers exist). --- arch/i386/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index ec718b194847e..1525cf779ecf1 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c @@ -380,7 +380,7 @@ void enable_irq(unsigned int irq) spin_lock_irqsave(&desc->lock, flags); switch (desc->depth) { case 1: { - unsigned int status = desc->status & ~IRQ_DISABLED; + unsigned int status = desc->status & ~(IRQ_DISABLED | IRQ_INPROGRESS); desc->status = status; if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { desc->status = status | IRQ_REPLAY; -- 2.53.0