Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uio: fix devm_request_irq usage

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.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: stable <stable@vger.kernel.org> # 3.13
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Aaro Koskinen and committed by
Greg Kroah-Hartman
632fefaf 65861ab4

+1 -1
+1 -1
drivers/uio/uio.c
··· 847 847 info->uio_dev = idev; 848 848 849 849 if (info->irq && (info->irq != UIO_IRQ_CUSTOM)) { 850 - ret = devm_request_irq(parent, info->irq, uio_interrupt, 850 + ret = devm_request_irq(idev->dev, info->irq, uio_interrupt, 851 851 info->irq_flags, info->name, idev); 852 852 if (ret) 853 853 goto err_request_irq;