linux/drivers/target
Dmitry Bogdanov 7f533cc5ee scsi: target: iscsi: Fix timeout on deleted connection
NOPIN response timer may expire on a deleted connection and crash with
such logs:

Did not receive response to NOPIN on CID: 0, failing connection for I_T Nexus (null),i,0x00023d000125,iqn.2017-01.com.iscsi.target,t,0x3d

BUG: Kernel NULL pointer dereference on read at 0x00000000
NIP  strlcpy+0x8/0xb0
LR iscsit_fill_cxn_timeout_err_stats+0x5c/0xc0 [iscsi_target_mod]
Call Trace:
 iscsit_handle_nopin_response_timeout+0xfc/0x120 [iscsi_target_mod]
 call_timer_fn+0x58/0x1f0
 run_timer_softirq+0x740/0x860
 __do_softirq+0x16c/0x420
 irq_exit+0x188/0x1c0
 timer_interrupt+0x184/0x410

That is because nopin response timer may be re-started on nopin timer
expiration.

Stop nopin timer before stopping the nopin response timer to be sure
that no one of them will be re-started.

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Link: https://lore.kernel.org/r/20241224101757.32300-1-d.bogdanov@yadro.com
Reviewed-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-04-11 22:13:00 -04:00
..
iscsi scsi: target: iscsi: Fix timeout on deleted connection 2025-04-11 22:13:00 -04:00
loopback scsi: target: tcm_loop: Fix wrong abort tag 2025-03-17 22:04:21 -04:00
sbp move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
tcm_fc move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
tcm_remote scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
Kconfig scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
Makefile scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
target_core_alua.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_alua.h
target_core_configfs.c scsi: target: Replace deprecated strncpy() with strscpy() 2025-03-03 22:11:48 -05:00
target_core_device.c scsi: usb: Rename the RESERVE and RELEASE constants 2025-02-12 22:20:55 -05:00
target_core_fabric_configfs.c scsi: target: Export fabric driver direct submit settings 2023-10-13 15:53:58 -04:00
target_core_fabric_lib.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_file.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_file.h
target_core_hba.c
target_core_iblock.c block: split struct bio_integrity_payload 2025-03-03 11:17:52 -07:00
target_core_iblock.h target: port block device access to file 2024-02-25 12:05:25 +01:00
target_core_internal.h Merge patch series "target: TMF and recovery fixes" 2023-03-24 17:39:15 -04:00
target_core_pr.c scsi: usb: Rename the RESERVE and RELEASE constants 2025-02-12 22:20:55 -05:00
target_core_pr.h
target_core_pscsi.c block: remove bio_add_pc_page 2025-01-04 15:27:35 -07:00
target_core_pscsi.h target: port block device access to file 2024-02-25 12:05:25 +01:00
target_core_rd.c scsi: target: Rename sbc_ops to exec_cmd_ops 2023-04-11 21:55:36 -04:00
target_core_rd.h
target_core_sbc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_spc.c scsi: usb: Rename the RESERVE and RELEASE constants 2025-02-12 22:20:55 -05:00
target_core_stat.c scsi: target: core: Add line break to status show 2025-01-21 12:19:04 -05:00
target_core_tmr.c scsi: target: Fix multiple LUN_RESET handling 2023-03-24 17:32:23 -04:00
target_core_tpg.c Merge patch series "target: TMF and recovery fixes" 2023-03-24 17:39:15 -04:00
target_core_transport.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_ua.c
target_core_ua.h
target_core_user.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
target_core_xcopy.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_xcopy.h