linux/drivers/scsi/qla2xxx
Arun Easi d3871af13a scsi: qla2xxx: Fix crash when I/O abort times out
commit 68ad83188d upstream.

While performing CPU hotplug, a crash with the following stack was seen:

Call Trace:
     qla24xx_process_response_queue+0x42a/0x970 [qla2xxx]
     qla2x00_start_nvme_mq+0x3a2/0x4b0 [qla2xxx]
     qla_nvme_post_cmd+0x166/0x240 [qla2xxx]
     nvme_fc_start_fcp_op.part.0+0x119/0x2e0 [nvme_fc]
     blk_mq_dispatch_rq_list+0x17b/0x610
     __blk_mq_sched_dispatch_requests+0xb0/0x140
     blk_mq_sched_dispatch_requests+0x30/0x60
     __blk_mq_run_hw_queue+0x35/0x90
     __blk_mq_delay_run_hw_queue+0x161/0x180
     blk_execute_rq+0xbe/0x160
     __nvme_submit_sync_cmd+0x16f/0x220 [nvme_core]
     nvmf_connect_admin_queue+0x11a/0x170 [nvme_fabrics]
     nvme_fc_create_association.cold+0x50/0x3dc [nvme_fc]
     nvme_fc_connect_ctrl_work+0x19/0x30 [nvme_fc]
     process_one_work+0x1e8/0x3c0

On abort timeout, completion was called without checking if the I/O was
already completed.

Verify that I/O and abort request are indeed outstanding before attempting
completion.

Fixes: 71c80b75ce ("scsi: qla2xxx: Do command completion on abort timeout")
Reported-by: Marco Patalano <mpatalan@redhat.com>
Tested-by: Marco Patalano <mpatalan@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20221129092634.15347-1-njavali@marvell.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-31 13:14:47 +01:00
..
Kconfig
Makefile
qla_attr.c scsi: qla2xxx: Use transport-defined speed mask for supported_speeds 2022-11-03 23:59:12 +09:00
qla_bsg.c scsi: qla2xxx: Wind down adapter after PCIe error 2022-08-17 14:24:17 +02:00
qla_bsg.h
qla_dbg.c
qla_dbg.h
qla_def.h scsi: qla2xxx: Fix set-but-not-used variable warnings 2022-12-31 13:14:23 +01:00
qla_devtbl.h
qla_dfs.c
qla_dsd.h
qla_edif_bsg.h scsi: qla2xxx: edif: Synchronize NPIV deletion with authentication application 2022-08-17 14:23:39 +02:00
qla_edif.c scsi: qla2xxx: edif: Fix session thrash 2022-08-17 14:23:43 +02:00
qla_edif.h scsi: qla2xxx: edif: Fix session thrash 2022-08-17 14:23:43 +02:00
qla_fw.h scsi: qla2xxx: edif: Send LOGO for unexpected IKE message 2022-08-17 14:23:42 +02:00
qla_gbl.h scsi: qla2xxx: Fix response queue handler reading stale packets 2022-08-31 17:16:35 +02:00
qla_gs.c scsi: qla2xxx: Fix losing FCP-2 targets during port perturbation tests 2022-08-17 14:24:18 +02:00
qla_init.c scsi: qla2xxx: Fix crash when I/O abort times out 2022-12-31 13:14:47 +01:00
qla_inline.h scsi: qla2xxx: Fix set-but-not-used variable warnings 2022-12-31 13:14:23 +01:00
qla_iocb.c scsi: qla2xxx: edif: Fix no logout on delete for N2N 2022-08-17 14:23:43 +02:00
qla_isr.c scsi: qla2xxx: edif: Fix dropped IKE message 2022-08-31 17:16:35 +02:00
qla_mbx.c scsi: qla2xxx: Fix erroneous mailbox timeout after PCI error injection 2022-08-17 14:24:17 +02:00
qla_mid.c scsi: qla2xxx: edif: Synchronize NPIV deletion with authentication application 2022-08-17 14:23:39 +02:00
qla_mr.c
qla_mr.h
qla_nvme.c scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover" 2022-08-17 14:22:45 +02:00
qla_nvme.h
qla_nx2.c
qla_nx2.h
qla_nx.c
qla_nx.h
qla_os.c scsi: qla2xxx: Fix set-but-not-used variable warnings 2022-12-31 13:14:23 +01:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Add devids and conditionals for 28xx 2022-04-08 14:24:06 +02:00
qla_target.c scsi: qla2xxx: Fix memory leak in __qlt_24xx_handle_abts() 2022-09-28 11:11:47 +02:00
qla_target.h
qla_tmpl.c scsi: qla2xxx: Fix premature hw access after PCI error 2022-04-08 14:24:05 +02:00
qla_tmpl.h
qla_version.h
tcm_qla2xxx.c
tcm_qla2xxx.h