lkml.org 
[lkml]   [2006]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: 2.6.17-rc5-mm1 - output of lock validator
From
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 <herbert@gondor.apana.org.au>

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
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) {
\
 
 \ /
  Last update: 2006-06-01 10:12    [W:0.179 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site