]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: rtsx: Release IRQ during shutdown
authorSinan Kaya <okaya@codeaurora.org>
Wed, 3 Jan 2018 12:32:45 +0000 (07:32 -0500)
committerLee Jones <lee.jones@linaro.org>
Fri, 5 Jan 2018 11:14:57 +0000 (11:14 +0000)
commit2a886e6a3d28137a657e5dba6f4118cd90916ad9
tree59bd6d871fbfd8bb1f0260470f7ed3a6306d0da5
parent6ebfdc2edb3a84fa6b52ee806b0bc6b765b33b3e
mfd: rtsx: Release IRQ during shutdown

'Commit f11230cd0f88 ("PCI/portdrv: Turn off PCIe services during
shutdown")' revealed a resource leak in rtsx_pci driver during shutdown.

Issue shows up as a warning during shutdown as follows:

remove_proc_entry: removing non-empty directory 'irq/17', leaking at least
'rtsx_pci'
WARNING: CPU: 0 PID: 1578 at fs/proc/generic.c:572
remove_proc_entry+0x11d/0x130
Modules linked in <long list but none that are out-of-tree>
...
Call Trace:
unregister_irq_proc
free_desc
irq_free_descs
mp_unmap_irq
acpi_unregister_gsi_apic
acpi_pci_irq_disable
do_pci_disable_device
pci_disable_device
device_shutdown
kernel_restart
Sys_reboot

Even though rtsx_pci driver implements a shutdown callback, it is not
releasing the interrupt that it registered during probe. This is causing
the ACPI layer to complain that the shared IRQ is in use while freeing
IRQ.

This code releases the IRQ to prevent resource leak and eliminate the
warning.

Fixes: f11230cd0f88 ("PCI/portdrv: Turn off PCIe services during shutdown")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=198141
Reported-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rtsx_pcr.c