linux/drivers/net/ethernet/sfc
Íñigo Huguet 8f03eeb6e0 net:sfc: fix non-freed irq in legacy irq mode
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>
2021-05-21 14:51:10 -07:00
..
falcon pci-v5.13-changes 2021-05-05 13:24:11 -07:00
bitfield.h sfc: extend bitfield macros to 19 fields 2020-11-13 15:33:03 -08: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
ef10.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-26 12:00:00 -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: support GRE TSO on EF100 2020-11-13 15:33:30 -08: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: support GRE TSO on EF100 2020-11-13 15:33:30 -08:00
ef100_tx.h sfc: make ef100 xmit_more handling look more like ef10's 2020-09-05 12:21:39 -07: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
efx_channels.c sfc: adjust efx->xdp_tx_queue_count with the real number of initialized queues 2021-04-27 15:38:29 -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
efx.c PCI/VPD: Remove pci_vpd_find_tag() 'offset' argument 2021-04-30 14:38:32 -05:00
efx.h sfc: check hash is valid before using it 2020-08-14 14:07:16 -07:00
enum.h sfc: Remove duplicate argument 2021-04-14 13:55:07 -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
ethtool.c sfc: ef10: implement ethtool::get_fec_stats 2021-04-15 17:08:29 -07:00
farch_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
farch.c sfc: farch: fix TX queue lookup in TX event handling 2021-04-20 17:03:53 -07: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
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
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_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
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.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
mtd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
net_driver.h sfc: ef10: implement ethtool::get_fec_stats 2021-04-15 17:08:29 -07:00
nic_common.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-05-21 14:51:10 -07:00
nic.h sfc: de-indirect TSO handling 2020-09-11 17:15:22 -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_common.c xsk: Propagate napi_id to XDP socket Rx path 2020-12-01 00:09:25 +01:00
rx_common.h sfc: commonise efx_sync_rx_buffer() 2020-06-30 13:09:09 -07:00
rx.c sfc: Use 'skb_add_rx_frag()' instead of hand coding it 2021-04-05 11:55:44 -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_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
siena.c sfc: return errors from efx_mcdi_set_id_led, and de-indirect 2020-08-31 12:28:50 -07: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_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
tx.c bpf, devmap: Move drop error path to devmap for XDP_REDIRECT 2021-03-18 16:38:51 +01:00
tx.h sfc: select inner-csum-offload TX queues for skbs that need it 2020-09-11 17:15:22 -07: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