1
0
Fork 0
freescale-linux-fslc/drivers/net/ethernet/sfc
Íñigo Huguet 8d717c9135 net:sfc: fix non-freed irq in legacy irq mode
[ Upstream commit 8f03eeb6e0a0a0b8d617ee0a4bce729e47130036 ]

SFC driver can be configured via modparam to work using MSI-X, MSI or
legacy IRQ interrupts. In the last one, the interrupt was not properly
released on module remove.

It was not freed because the flag irqs_hooked was not set during
initialization in the case of using legacy IRQ.

Example of (trimmed) trace during module remove without this fix:

remove_proc_entry: removing non-empty directory 'irq/125', leaking at least '0000:3b:00.1'
WARNING: CPU: 39 PID: 3658 at fs/proc/generic.c:715 remove_proc_entry+0x15c/0x170
...trimmed...
Call Trace:
 unregister_irq_proc+0xe3/0x100
 free_desc+0x29/0x70
 irq_free_descs+0x47/0x70
 mp_unmap_irq+0x58/0x60
 acpi_unregister_gsi_ioapic+0x2a/0x40
 acpi_pci_irq_disable+0x78/0xb0
 pci_disable_device+0xd1/0x100
 efx_pci_remove+0xa1/0x1e0 [sfc]
 pci_device_remove+0x38/0xa0
 __device_release_driver+0x177/0x230
 driver_detach+0xcb/0x110
 bus_remove_driver+0x58/0xd0
 pci_unregister_driver+0x2a/0xb0
 efx_exit_module+0x24/0xf40 [sfc]
 __do_sys_delete_module.constprop.0+0x171/0x280
 ? exit_to_user_mode_prepare+0x83/0x1d0
 do_syscall_64+0x3d/0x80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f9f9385800b
...trimmed...

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-16 12:01:36 +02:00
..
falcon drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
Kconfig sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
Makefile sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
bitfield.h sfc: extend bitfield macros up to POPULATE_DWORD_13 2020-06-29 17:37:48 -07:00
ef10.c sfc: ef10: fix TX queue lookup in TX event handling 2021-05-14 09:50:41 +02:00
ef10_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ef10_sriov.c sfc: move vport_id to struct efx_nic 2020-05-11 13:31:49 -07:00
ef10_sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ef100.c sfc: Fix error code in probe 2020-09-21 13:55:13 -07:00
ef100.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_ethtool.c sfc: add ethtool ops and miscellaneous ndos to EF100 2020-09-07 14:46:13 -07:00
ef100_ethtool.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_netdev.c sfc: add ethtool ops and miscellaneous ndos to EF100 2020-09-07 14:46:13 -07:00
ef100_netdev.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_nic.c sfc: remove duplicate call to efx_init_channels from EF100 probe 2020-09-11 14:55:14 -07:00
ef100_nic.h sfc_ef100: add nic-type for VFs, and bind to them 2020-08-03 18:22:55 -07:00
ef100_regs.h sfc_ef100: add EF100 register definitions 2020-07-27 12:26:55 -07:00
ef100_rx.c sfc: fix boolreturn.cocci warning and rename function 2020-08-24 18:14:23 -07:00
ef100_rx.h sfc: check hash is valid before using it 2020-08-14 14:07:16 -07:00
ef100_tx.c sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
ef100_tx.h sfc: make ef100 xmit_more handling look more like ef10's 2020-09-05 12:21:39 -07:00
efx.c sfc: advertise encapsulated offloads on EF10 2020-09-11 17:15:22 -07:00
efx.h sfc: check hash is valid before using it 2020-08-14 14:07:16 -07:00
efx_channels.c sfc: decouple TXQ type from label 2020-09-11 17:15:22 -07:00
efx_channels.h sfc: cleanups around efx_alloc_channel 2020-09-11 14:55:14 -07:00
efx_common.c sfc: move initialisation of efx->filter_sem to efx_init_struct() 2020-10-20 21:22:23 -07:00
efx_common.h sfc: advertise encapsulated offloads on EF10 2020-09-11 17:15:22 -07:00
enum.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ethtool.c sfc: return errors from efx_mcdi_set_id_led, and de-indirect 2020-08-31 12:28:50 -07:00
ethtool_common.c sfc: decouple TXQ type from label 2020-09-11 17:15:22 -07:00
ethtool_common.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
farch.c sfc: farch: fix TX queue lookup in TX event handling 2021-05-11 14:47:36 +02:00
farch_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
filter.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io.h sfc_ef100: register accesses on EF100 2020-07-27 12:26:55 -07:00
mcdi.c sfc: return errors from efx_mcdi_set_id_led, and de-indirect 2020-08-31 12:28:50 -07:00
mcdi.h sfc: fix kdoc warning 2020-09-25 16:29:00 -07:00
mcdi_filters.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mcdi_filters.h sfc_ef100: helper function to set default RSS table of given size 2020-07-02 14:47:40 -07:00
mcdi_functions.c sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
mcdi_functions.h sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
mcdi_mon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mcdi_pcol.h sfc: update MCDI protocol headers 2020-06-29 17:37:48 -07:00
mcdi_port.c sfc: remove phy_op indirection 2020-09-07 14:46:13 -07:00
mcdi_port.h sfc: move NIC-specific mcdi_port declarations out of common header 2020-06-30 13:09:09 -07:00
mcdi_port_common.c sfc: coding style cleanups in mcdi_port_common.c 2020-09-08 20:14:33 -07:00
mcdi_port_common.h sfc: coding style cleanups in mcdi_port_common.c 2020-09-08 20:14:33 -07:00
mtd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
net_driver.h net: sfc: Replace in_interrupt() usage 2020-09-29 14:02:54 -07:00
nic.c net:sfc: fix non-freed irq in legacy irq mode 2021-06-16 12:01:36 +02:00
nic.h sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
nic_common.h net: sfc: Replace in_interrupt() usage 2020-09-29 14:02:54 -07:00
ptp.c drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
ptp.h sfc: split up nic.h 2020-06-29 17:37:48 -07:00
rx.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rx_common.c sfc: move initialisation of efx->filter_sem to efx_init_struct() 2020-10-20 21:22:23 -07:00
rx_common.h sfc: commonise efx_sync_rx_buffer() 2020-06-30 13:09:09 -07:00
selftest.c sfc: define inner/outer csum offload TXQ types 2020-09-11 17:15:22 -07:00
selftest.h sfc: decouple TXQ type from label 2020-09-11 17:15:22 -07:00
siena.c sfc: return errors from efx_mcdi_set_id_led, and de-indirect 2020-08-31 12:28:50 -07:00
siena_sriov.c sfc: move channel alloc/removal code 2020-01-08 13:28:03 -08:00
siena_sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sriov.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tx.c sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
tx.h sfc: select inner-csum-offload TX queues for skbs that need it 2020-09-11 17:15:22 -07:00
tx_common.c sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
tx_common.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
tx_tso.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfdi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
workarounds.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00