Messages in this thread | | | Date | Sun, 16 Aug 2009 15:19:03 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: Threaded interrupt handlers broken? |
| |
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
| |