linux-stable/drivers/scsi/qedi
Zhen Lei 95bbdca499 scsi: qedi: Fix a possible memory leak in qedi_alloc_and_init_sb()
Hook "qedi_ops->common->sb_init = qed_sb_init" does not release the DMA
memory sb_virt when it fails. Add dma_free_coherent() to free it. This
is the same way as qedr_alloc_mem_sb() and qede_alloc_mem_sb().

Fixes: ace7f46ba5 ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20241026125711.484-3-thunder.leizhen@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-11-06 20:46:36 -05:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qedi_dbg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qedi_dbg.h scsi: qedi: Remove unneeded version.h include 2023-02-21 22:00:51 -05:00
qedi_debugfs.c scsi: qedi: Fix crash while reading debugfs attribute 2024-04-24 21:09:08 -04:00
qedi_fw_api.c qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
qedi_fw_iscsi.h qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
qedi_fw_scsi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qedi_fw.c SCSI misc on 20220324 2022-03-24 19:37:53 -07:00
qedi_gbl.h scsi: qedi: Remove unused declarations 2023-08-24 22:09:04 -04:00
qedi_hsi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qedi_iscsi.c scsi: iscsi: Declare SCSI host template const 2023-03-24 19:19:57 -04:00
qedi_iscsi.h scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue 2021-12-06 22:00:54 -05:00
qedi_main.c scsi: qedi: Fix a possible memory leak in qedi_alloc_and_init_sb() 2024-11-06 20:46:36 -05:00
qedi_nvm_iscsi_cfg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qedi_sysfs.c scsi: qedi: Switch to attribute groups 2021-10-16 21:45:58 -04:00
qedi_version.h SCSI fixes on 20190622 2019-06-22 09:39:03 -07:00
qedi.h scsi: qedi: Fix cleanup session block/unblock use 2021-06-02 01:28:23 -04:00