linux-stable/drivers/s390/net
Julian Ruess 8f8ffd565f s390/ism: Fix trying to free already-freed IRQ by repeated ism_dev_exit()
commit 78d0f94902 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-21 16:02:10 +02:00
..
ctcm_dbug.c
ctcm_dbug.h
ctcm_fsms.c s390/ctcm: cleanup indenting 2023-02-10 19:49:53 -08:00
ctcm_fsms.h
ctcm_main.c s390/ctcm: cleanup indenting 2023-02-10 19:49:53 -08:00
ctcm_main.h
ctcm_mpc.c s390/ctcm: cleanup indenting 2023-02-10 19:49:53 -08:00
ctcm_mpc.h
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.h net/ism: Add new API for client registration 2023-01-25 09:46:48 +00:00
ism_drv.c s390/ism: Fix trying to free already-freed IRQ by repeated ism_dev_exit() 2023-06-21 16:02:10 +02:00
Kconfig
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.h
qeth_core_main.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_core_mpc.c
qeth_core_mpc.h
qeth_core_sys.c s390/qeth: Convert sysfs sprintf to sysfs_emit 2023-02-10 19:49:53 -08:00
qeth_ethtool.c s390/qeth: Convert sprintf/snprintf to scnprintf 2023-02-10 19:49:53 -08:00
qeth_l2.h
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_l3.h
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
smsgiucv.c
smsgiucv.h
smsgiucv_app.c