Re: Threaded interrupt handlers broken?

From: Sebastian Andrzej Siewior
Date: Fri Sep 04 2009 - 15:37:58 EST

* Michael Buesch | 2009-09-04 21:05:51 [+0200]:

>> Hm, I've got a strange problem here related to threaded IRQs and rmmod.
>> If I do this sequence, it crashes the machine:
>> request_threaded_irq();
>> free_irq();
>> rmmod module
>> modprobe module
>> request_threaded_irq();
>> *boom*
>> Here are some oops messages. These are almost always different, so I
>> guess it crashes in IRQ context at random places when the IRQ triggers.
>> It seems to be a NULL pointer dereference somewhere, but I can't locate it.
>> Note that it does not happen, if I omit the rmmod.
>Ok, what I see now is that the IRQ thread that belongs to the driver is not
>destroyed on free_irq(). So it is dangling and after rmmod/modprobe it will crash
>on interrupt, because the module is relocated.
>Bringing the device up and down several times (without reloading the module), which
>does several request_threaded_irq(); free_irq() sequences in a row, creates a new
>IRQ thread each time but does not destroy the old one.

The threaded interrupt infrastructure is okay as far as I can see it. My
currently OOT driver uses request_threaded_irq() and I can
modprobe/rmmod it with no problems. I just rebased it on top of -rc8 and
see no problems.

>Greetings, Michael.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at