]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
scsi: lpfc: Fix possible memory leak when failing to issue CMF WQE
authorJames Smart <jsmart2021@gmail.com>
Fri, 1 Jul 2022 21:14:18 +0000 (14:14 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:57:33 +0000 (11:57 +0200)
commita6433230c1c2112e8593ffaf37a1886016ef7ac6
treea461c51f90768b0311d7345906b80a0120137d91
parentb422a193b571cb2ca67856544e89c627b2ca4562
scsi: lpfc: Fix possible memory leak when failing to issue CMF WQE

BugLink: https://bugs.launchpad.net/bugs/1990564
[ Upstream commit 2f67dc7970bce3529edce93a0a14234d88b3fcd5 ]

There is no corresponding free routine if lpfc_sli4_issue_wqe fails to
issue the CMF WQE in lpfc_issue_cmf_sync_wqe.

If ret_val is non-zero, then free the iocbq request structure.

Link: https://lore.kernel.org/r/20220701211425.2708-6-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/lpfc/lpfc_sli.c