linux/drivers/s390/net
Julian Ruess 78d0f94902 s390/ism: Fix trying to free already-freed IRQ by repeated ism_dev_exit()
This patch prevents the system from crashing when unloading the ISM module.

How to reproduce: Attach an ISM device and execute 'rmmod ism'.

Error-Log:
- Trying to free already-free IRQ 0
- WARNING: CPU: 1 PID: 966 at kernel/irq/manage.c:1890 free_irq+0x140/0x540

After calling ism_dev_exit() for each ISM device in the exit routine,
pci_unregister_driver() will execute ism_remove() for each ISM device.
Because ism_remove() also calls ism_dev_exit(),
free_irq(pci_irq_vector(pdev, 0), ism) is called twice for each ISM
device. This results in a crash with the error
'Trying to free already-free IRQ'.

In the exit routine, it is enough to call pci_unregister_driver()
because it ensures that ism_dev_exit() is called once per
ISM device.

Cc: <stable@vger.kernel.org> # 6.3+
Fixes: 89e7d2ba61 ("net/ism: Add new API for client registration")
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-15 08:48:45 +01:00
..
ctcm_dbug.c
ctcm_dbug.h s390/ctcm: add __printf format attribute to ctcm_dbf_longtext 2021-11-19 11:12:30 +00:00
ctcm_fsms.c s390/ctcm: cleanup indenting 2023-02-10 19:49:53 -08:00
ctcm_fsms.h s390/ctcm: remove orphaned function declarations 2020-10-02 16:22:49 -07:00
ctcm_main.c s390/ctcm: cleanup indenting 2023-02-10 19:49:53 -08:00
ctcm_main.h s390/ctcm: Use GFP_ATOMIC in ctcmpc_tx(). 2020-12-01 16:56:02 -08:00
ctcm_mpc.c s390/ctcm: cleanup indenting 2023-02-10 19:49:53 -08:00
ctcm_mpc.h s390/ctcm: remove orphaned function declarations 2020-10-02 16:22:49 -07:00
ctcm_sysfs.c s390/ctcm: fix variable dereferenced before check 2022-05-11 12:31:01 +01:00
fsm.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
fsm.h
ism_drv.c s390/ism: Fix trying to free already-freed IRQ by repeated ism_dev_exit() 2023-06-15 08:48:45 +01:00
ism.h net/ism: Add new API for client registration 2023-01-25 09:46:48 +00:00
Kconfig s390/qeth: Switchdev event handler 2021-08-07 09:44:02 +01:00
lcs.c s390/lcs: Fix return type of lcs_start_xmit() 2022-11-07 11:24:37 +00:00
lcs.h
Makefile
netiucv.c s390/netiucv: Fix return type of netiucv_tx() 2022-11-07 11:24:37 +00:00
qeth_core_main.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_core_mpc.c s390/qeth: remove OSN support 2021-07-20 06:17:06 -07:00
qeth_core_mpc.h s390/qeth: clean up QETH_PROT_* naming 2021-07-20 06:17:06 -07:00
qeth_core_sys.c s390/qeth: Convert sysfs sprintf to sysfs_emit 2023-02-10 19:49:53 -08:00
qeth_core.h qeth: remove a copy of the NAPI_POLL_WEIGHT define 2022-04-29 11:56:42 +01:00
qeth_ethtool.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_l2_main.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_l2_sys.c s390/qeth: Convert sysfs sprintf to sysfs_emit 2023-02-10 19:49:53 -08:00
qeth_l2.h s390/qeth: use dev->groups for common sysfs attributes 2020-12-07 06:55:21 -08:00
qeth_l3_main.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_l3_sys.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_l3.h s390/qeth: use dev->groups for common sysfs attributes 2020-12-07 06:55:21 -08:00
smsgiucv_app.c
smsgiucv.c s390/net: remove pm support from iucv drivers 2020-05-19 12:48:39 -07:00
smsgiucv.h