linux/drivers/target/iscsi
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
..
cxgbit move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
Kconfig scsi: target: iscsi: switch to using the crc32c library 2024-12-01 17:23:02 -08:00
Makefile
iscsi_target.c scsi: target: iscsi: Fix timeout on deleted connection 2025-04-11 22:13:00 -04:00
iscsi_target.h scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_auth.c
iscsi_target_auth.h
iscsi_target_configfs.c scsi: target: Have drivers report if they support direct submissions 2023-10-13 15:53:57 -04:00
iscsi_target_datain_values.c
iscsi_target_datain_values.h
iscsi_target_device.c
iscsi_target_device.h
iscsi_target_erl0.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
iscsi_target_erl0.h
iscsi_target_erl1.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
iscsi_target_erl1.h
iscsi_target_erl2.c scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_erl2.h scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_login.c scsi: target: iscsi: switch to using the crc32c library 2024-12-01 17:23:02 -08:00
iscsi_target_login.h scsi: target: iscsi: switch to using the crc32c library 2024-12-01 17:23:02 -08:00
iscsi_target_nego.c scsi: target: iscsi: Fix typos 2025-02-12 22:01:34 -05:00
iscsi_target_nego.h scsi: target: Remove unused declarations 2024-08-22 21:15:21 -04:00
iscsi_target_nodeattrib.c
iscsi_target_nodeattrib.h
iscsi_target_parameters.c scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_parameters.h scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_seq_pdu_list.c
iscsi_target_seq_pdu_list.h
iscsi_target_stat.c
iscsi_target_tmr.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
iscsi_target_tmr.h
iscsi_target_tpg.c scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_tpg.h scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00
iscsi_target_transport.c
iscsi_target_util.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
iscsi_target_util.h scsi: target: Remove unused functions 2025-01-02 13:19:34 -05:00