Re: 2.6.17-rc5-mm1 - output of lock validator

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

 



On Wed, May 31, 2006 at 09:24:12PM +0000, Arjan van de Ven wrote:
> 
> misrouted_irq() in kernel/irq/spurious.c
> afaics that calls all handlers registered to the system regardless of what
> irq number they are registered for.....
> 
> which breaks the disable_irq() locking trick... because your irq handler now
> gets called anyway!

This is a serious bug in misrouted_irq().  disable_irq() is a software
state and must be repsected.

[IRQ]: Check IRQ_DISABLED in misrouted_irq

The misrouted interrupt function didn't check the IRQ_DISABLED flag
before calling the handlers.  This is highly undesirable as handlers
are usually disabled for a good reason.

Signed-off-by: Herbert Xu <[email protected]>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 7df9abd..0540b72 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -31,6 +31,10 @@ static int misrouted_irq(int irq, struct
 			continue;
 		desc = &irq_desc[i];
 		spin_lock(&desc->lock);
+		if (desc->status & IRQ_DISABLED) {
+			spin_unlock(&desc->lock);
+			continue;
+		}
 		action = desc->action;
 		/* Already running on another processor */
 		if (desc->status & IRQ_INPROGRESS) {

[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