2005-09-17 10:06:37

by Manu Abraham

[permalink] [raw]
Subject: free free irq and Oops on cat /proc/interrupts

cpu 175 0 199 11504 968 1 1 0
cpu0 175 0 199 11504 968 1 1 0
intr 15790 12849 418 0 0 0 0 0 0 0 0 0 0 110 0 2196 0 0 0 0 0 0 0 217 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 16743
btime 1126950459
processes 2274
procs_running 1
procs_blocked 0


Attachments:
dmesg_after_cat_int.txt (12.06 kB)
dmesg_module_load.txt (10.42 kB)
dmesg_module_unload.txt (10.46 kB)
interrupts_after_unloading.txt (0.00 B)
interrupts_before_loading.txt (323.00 B)
mantis_common.h (2.41 kB)
mantis_pci.c (3.05 kB)
stat_after_unloading.txt (612.00 B)
stat_before_loading.txt (609.00 B)
Download all attachments

2005-09-18 01:26:39

by Edgar Toernig

[permalink] [raw]
Subject: Re: free free irq and Oops on cat /proc/interrupts

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.