1
0
Fork 0
alistair23-linux/drivers/scsi/qla2xxx
Bart Van Assche 39c0c8553b scsi: Revert "qla2xxx: Make sure that aborted commands are freed"
Calling vha->hw->tgt.tgt_ops->free_cmd() from qlt_xmit_response() is wrong
since the command for which a response is sent must remain valid until the
SCSI target core calls .release_cmd(). It has been observed that the
following scenario triggers a kernel crash:

 - qlt_xmit_response() calls qlt_check_reserve_free_req()

 - qlt_check_reserve_free_req() returns -EAGAIN

 - qlt_xmit_response() calls vha->hw->tgt.tgt_ops->free_cmd(cmd)

 - transport_handle_queue_full() tries to retransmit the response

Fix this crash by reverting the patch that introduced it.

Link: https://lore.kernel.org/r/20210320232359.941-2-bvanassche@acm.org
Fixes: 0dcec41acb ("scsi: qla2xxx: Make sure that aborted commands are freed")
Cc: Quinn Tran <qutran@marvell.com>
Cc: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-03-24 21:45:06 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla_attr.c scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port 2021-01-13 00:25:19 -05:00
qla_bsg.c scsi: qla2xxx: Fix some memory corruption 2021-01-26 22:06:26 -05:00
qla_bsg.h scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port 2021-01-13 00:25:19 -05:00
qla_dbg.c scsi: qla2xxx: Fix mailbox Ch erroneous error 2021-01-13 00:25:20 -05:00
qla_dbg.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_def.h scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe 2021-01-13 00:25:20 -05:00
qla_devtbl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla_dfs.c scsi: qla2xxx: Remove unnecessary NULL check 2021-01-22 22:04:16 -05:00
qla_dsd.h scsi: qla2xxx: Include the <asm/unaligned.h> header file from qla_dsd.h 2019-08-12 21:34:04 -04:00
qla_fw.h scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe 2021-01-13 00:25:20 -05:00
qla_gbl.h scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe 2021-01-13 00:25:20 -05:00
qla_gs.c scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port 2021-01-13 00:25:19 -05:00
qla_init.c scsi: qla2xxx: Remove redundant NULL check 2021-01-22 22:29:09 -05:00
qla_inline.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_iocb.c scsi: qla2xxx: Enable NVMe CONF (BIT_7) when enabling SLER 2021-01-13 00:25:20 -05:00
qla_isr.c scsi: qla2xxx: Assign boolean values to a bool variable 2021-01-22 22:02:47 -05:00
qla_mbx.c scsi: qla2xxx: Fix mailbox Ch erroneous error 2021-01-13 00:25:20 -05:00
qla_mid.c SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_mr.c scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_mr.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_nvme.c scsi: qla2xxx: Simplify the calculation of variables 2021-01-29 13:34:10 -05:00
qla_nvme.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_nx.c scsi: qla2xxx: Fix compilation issue in PPC systems 2020-12-09 11:34:17 -05:00
qla_nx.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_nx2.c scsi: qla2xxx: Fix compilation issue in PPC systems 2020-12-09 11:34:17 -05:00
qla_nx2.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_os.c Merge branch '5.11/scsi-fixes' into 5.12/scsi-queue 2021-01-26 21:52:58 -05:00
qla_settings.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_sup.c scsi: qla2xxx: Fix flash update in 28XX adapters on big endian machines 2020-12-09 11:34:18 -05:00
qla_target.c scsi: Revert "qla2xxx: Make sure that aborted commands are freed" 2021-03-24 21:45:06 -04:00
qla_target.h scsi: qla2xxx: Fix broken #endif placement 2021-03-15 22:53:24 -04:00
qla_tmpl.c SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
qla_tmpl.h scsi: qla2xxx: Fix crash during driver load on big endian machines 2020-12-09 11:34:17 -05:00
qla_version.h scsi: qla2xxx: Update version to 10.02.00.105-k 2021-01-13 00:25:20 -05:00
tcm_qla2xxx.c scsi: Revert "qla2xxx: Make sure that aborted commands are freed" 2021-03-24 21:45:06 -04:00
tcm_qla2xxx.h scsi: qla2xxx: deadlock by configfs_depend_item 2018-12-19 21:26:38 -05:00