Re: free free irq and Oops on cat /proc/interrupts

From: Edgar Toernig
Date: Sat Sep 17 2005 - 20:27:50 EST

Manu Abraham wrote:
> Can somebody give me a pointer as to what i am possibly doing wrong.
> i get a "free free IRQ" on free_irq()..
>[and a kernel oops]

| if (request_irq(pdev->irq, mantis_pci_irq, SA_SHIRQ | SA_INTERRUPT,
| DRIVER_NAME, mantis) < 0) {
| free_irq(pdev->irq, pdev);

The last arg of request_irq and free_irq has to match - it is the id
that distinguishes different users of the same irq. As there never
was a request_irq with pdev you get that error on free_irq.

The module unload still takes place. So trying to cat /proc/interrupts
later on will stumble over the still installed handler with the mantis
id - unfortunately, the driver (and especially DRIVER_NAME) is no longer
in memory ...

Ciao, ET.
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