Re: Threaded interrupt handlers broken?

From: Thomas Gleixner
Date: Sun Aug 16 2009 - 09:19:26 EST


On Sun, 16 Aug 2009, Michael Buesch wrote:

> Hi,
>

> I was trying to use threaded interrupt handlers, but the code always
> crashes within irq_thread() with a "BUG: spinlock bad magic
> 00000000". The spinlock that's not properly initialized is from the
> wait_for_threads waitqueue.
>
> It crashes on line 526 (see below). The initialization of the
> waitqueue struct seems to depend on whether the IRQ is shared or
> not. I don't know if that's correct, but I patched it to
> unconditionally initialize the struct. That did not help.

Hmm. The waitqueue is initialized when the first handler is set up. In
that case shared == 0. When the second handler is installed we do not
initialize it again as it is already initialized and even might have
waiters queued. I'll have a look.

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/