kernel_samsung_a53x/drivers/target
Dmitry Bogdanov 553cc920e6 scsi: target: core: Add TMF to tmr_list handling
[ Upstream commit 83ab68168a3d990d5ff39ab030ad5754cbbccb25 ]

An abort that is responded to by iSCSI itself is added to tmr_list but does
not go to target core. A LUN_RESET that goes through tmr_list takes a
refcounter on the abort and waits for completion. However, the abort will
be never complete because it was not started in target core.

 Unable to locate ITT: 0x05000000 on CID: 0
 Unable to locate RefTaskTag: 0x05000000 on CID: 0.
 wait_for_tasks: Stopping tmf LUN_RESET with tag 0x0 ref_task_tag 0x0 i_state 34 t_state ISTATE_PROCESSING refcnt 2 transport_state active,stop,fabric_stop
 wait for tasks: tmf LUN_RESET with tag 0x0 ref_task_tag 0x0 i_state 34 t_state ISTATE_PROCESSING refcnt 2 transport_state active,stop,fabric_stop
...
 INFO: task kworker/0:2:49 blocked for more than 491 seconds.
 task:kworker/0:2     state:D stack:    0 pid:   49 ppid:     2 flags:0x00000800
 Workqueue: events target_tmr_work [target_core_mod]
Call Trace:
 __switch_to+0x2c4/0x470
 _schedule+0x314/0x1730
 schedule+0x64/0x130
 schedule_timeout+0x168/0x430
 wait_for_completion+0x140/0x270
 target_put_cmd_and_wait+0x64/0xb0 [target_core_mod]
 core_tmr_lun_reset+0x30/0xa0 [target_core_mod]
 target_tmr_work+0xc8/0x1b0 [target_core_mod]
 process_one_work+0x2d4/0x5d0
 worker_thread+0x78/0x6c0

To fix this, only add abort to tmr_list if it will be handled by target
core.

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Link: https://lore.kernel.org/r/20240111125941.8688-1-d.bogdanov@yadro.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 22:25:32 +01:00
..
iscsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
loopback Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcm_fc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_alua.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_alua.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_device.c scsi: target: core: Add TMF to tmr_list handling 2024-11-18 22:25:32 +01:00
target_core_fabric_configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_fabric_lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_file.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_hba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_iblock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_iblock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_pr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_pr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_pscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_pscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_rd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_rd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_sbc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_spc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_stat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_tmr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_tpg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_transport.c scsi: target: core: Add TMF to tmr_list handling 2024-11-18 22:25:32 +01:00
target_core_ua.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_ua.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_user.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_xcopy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target_core_xcopy.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00