Re: [PATCH] uio: fix devm_request_irq usage

From: Aaro Koskinen
Date: Fri Dec 20 2013 - 13:01:12 EST


Hi,

On Fri, Dec 20, 2013 at 08:49:13AM -0800, Greg Kroah-Hartman wrote:
> On Fri, Dec 20, 2013 at 04:19:47PM +0200, Aaro Koskinen wrote:
> > Commit e6789cd3dfb553077606ccafeb05e0043f072481 (uio: Simplify uio error
> > path by using devres functions) converted uio to use devm_request_irq().
> > This introduced a change in behaviour since the IRQ is associated with
> > the parent device instead of the created UIO device. The IRQ will remain
> > active after uio_unregister_device() is called, and some drivers will
> > crash because of this. The patch fixes this.
>
> What drivers crash because of this? Any in-kernel drivers?

I saw a crash with Intel DPDK (http://www.dpdk.org/) igb_uio
driver. Basically, they do:

uio_unregister_device
pci_disable_msix <-- this will BUG() if there is an active IRQ

I cannot test any of the in-tree UIO drivers, but at least some
of them seem to release resources the IRQ handler might use after
uio_unregister_device(). So if the IRQ fires results would not probably
be very good.

A.
--
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/