linux-stable/drivers/scsi/qla2xxx
Gleb Chesnokov c3d7a2bea0 scsi: qla2xxx: Fix missed DMA unmap for aborted commands
[ Upstream commit 26f9ce5381 ]

Aborting commands that have already been sent to the firmware can
cause BUG in qlt_free_cmd(): BUG_ON(cmd->sg_mapped)

For instance:

 - Command passes rdx_to_xfer state, maps sgl, sends to the firmware

 - Reset occurs, qla2xxx performs ISP error recovery, aborts the command

 - Target stack calls qlt_abort_cmd() and then qlt_free_cmd()

 - BUG_ON(cmd->sg_mapped) in qlt_free_cmd() occurs because sgl was not
   unmapped

Thus, unmap sgl in qlt_abort_cmd() for commands with the aborted flag set.

Link: https://lore.kernel.org/r/AS8PR10MB4952D545F84B6B1DFD39EC1E9DEE9@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Gleb Chesnokov <Chesnokov.G@raidix.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:59:12 +02:00
..
Kconfig
Makefile
qla_attr.c scsi: qla2xxx: Add devids and conditionals for 28xx 2022-04-08 13:58:50 +02:00
qla_bsg.c scsi: qla2xxx: Implement ref count for SRB 2022-04-08 13:58:49 +02:00
qla_bsg.h scsi: qla2xxx: Add support for mailbox passthru 2021-09-14 23:33:19 -04:00
qla_dbg.c scsi: qla2xxx: Format log strings only if needed 2021-12-06 22:38:17 -05:00
qla_dbg.h
qla_def.h scsi: qla2xxx: Fix laggy FC remote port session recovery 2022-04-08 13:58:50 +02:00
qla_devtbl.h
qla_dfs.c
qla_dsd.h
qla_edif.c scsi: qla2xxx: edif: Fix clang warning 2022-04-08 13:58:50 +02:00
qla_edif.h scsi: qla2xxx: edif: Fix inconsistent check of db_flags 2021-10-26 23:52:00 -04:00
qla_edif_bsg.h scsi: qla2xxx: edif: Increase ELS payload 2021-10-26 23:52:00 -04:00
qla_fw.h scsi: qla2xxx: edif: Add N2N support for EDIF 2021-08-23 22:36:53 -04:00
qla_gbl.h scsi: qla2xxx: Implement ref count for SRB 2022-04-08 13:58:49 +02:00
qla_gs.c scsi: qla2xxx: Use correct feature type field during RFF_ID processing 2022-04-08 13:58:51 +02:00
qla_init.c scsi: qla2xxx: Reduce false trigger to login 2022-04-08 13:58:51 +02:00
qla_inline.h scsi: qla2xxx: Implement ref count for SRB 2022-04-08 13:58:49 +02:00
qla_iocb.c scsi: qla2xxx: Add qla2x00_async_done() for async routines 2022-04-08 13:58:59 +02:00
qla_isr.c scsi: qla2xxx: Fix incorrect reporting of task management failure 2022-04-08 13:58:50 +02:00
qla_mbx.c scsi: qla2xxx: Add devids and conditionals for 28xx 2022-04-08 13:58:50 +02:00
qla_mid.c scsi: qla2xxx: Implement ref count for SRB 2022-04-08 13:58:49 +02:00
qla_mr.c scsi: qla2xxx: Implement ref count for SRB 2022-04-08 13:58:49 +02:00
qla_mr.h
qla_nvme.c scsi: qla2xxx: Fix missed DMA unmap for NVMe ls requests 2022-04-08 13:58:51 +02:00
qla_nvme.h
qla_nx.c
qla_nx.h
qla_nx2.c
qla_nx2.h
qla_os.c scsi: qla2xxx: Fix crash during module load unload test 2022-04-08 13:58:51 +02:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Add devids and conditionals for 28xx 2022-04-08 13:58:50 +02:00
qla_target.c scsi: qla2xxx: Fix missed DMA unmap for aborted commands 2022-05-25 09:59:12 +02:00
qla_target.h scsi: qla2xxx: edif: Add encryption to I/O path 2021-07-27 00:06:43 -04:00
qla_tmpl.c scsi: qla2xxx: Fix premature hw access after PCI error 2022-04-08 13:58:49 +02:00
qla_tmpl.h
qla_version.h scsi: qla2xxx: Update version to 10.02.07.200-k 2021-10-26 23:52:01 -04:00
tcm_qla2xxx.c scsi: target: qla2xxx: Replace enable attr with ops.enable 2021-10-04 23:27:38 -04:00
tcm_qla2xxx.h