linux-stable/drivers/scsi/lpfc
Justin Tee 3320126ed3 scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc()
[ Upstream commit 2ae917d4bc ]

The call to lpfc_sli4_resume_rpi() in lpfc_rcv_padisc() may return an
unsuccessful status.  In such cases, the elsiocb is not issued, the
completion is not called, and thus the elsiocb resource is leaked.

Check return value after calling lpfc_sli4_resume_rpi() and conditionally
release the elsiocb resource.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240131185112.149731-3-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 13:10:04 +02:00
..
lpfc.h scsi: lpfc: Fix possible file string name overflow when updating firmware 2023-11-15 09:52:57 -05:00
lpfc_attr.c scsi: lpfc: Change VMID driver load time parameters to read only 2023-12-13 22:17:56 -05:00
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Correct size for cmdwqe/rspwqe for memset() 2024-04-03 15:32:50 +02:00
lpfc_bsg.h
lpfc_compat.h
lpfc_crtn.h
lpfc_ct.c
lpfc_debugfs.c
lpfc_debugfs.h
lpfc_disc.h
lpfc_els.c scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes 2023-12-13 22:17:57 -05:00
lpfc_hbadisc.c scsi: lpfc: Eliminate unnecessary relocking in lpfc_check_nlp_post_devloss() 2023-11-15 09:52:57 -05:00
lpfc_hw.h
lpfc_hw4.h
lpfc_ids.h
lpfc_init.c scsi: lpfc: Fix possible file string name overflow when updating firmware 2023-11-15 09:52:57 -05:00
lpfc_logmsg.h
lpfc_mbox.c scsi: lpfc: Copyright updates for 14.2.0.16 patches 2023-11-15 09:52:58 -05:00
lpfc_mem.c scsi: lpfc: Copyright updates for 14.2.0.16 patches 2023-11-15 09:52:58 -05:00
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc() 2024-04-13 13:10:04 +02:00
lpfc_nvme.c
lpfc_nvme.h
lpfc_nvmet.c scsi: lpfc: Correct size for wqe for memset() 2024-04-03 15:32:50 +02:00
lpfc_scsi.c scsi: lpfc: Use unsigned type for num_sge 2024-02-05 16:19:11 -05:00
lpfc_scsi.h
lpfc_sli.c pci-v6.8-changes 2024-01-17 16:23:17 -08:00
lpfc_sli.h scsi: lpfc: Copyright updates for 14.2.0.16 patches 2023-11-15 09:52:58 -05:00
lpfc_sli4.h
lpfc_version.h scsi: lpfc: Update lpfc version to 14.2.0.17 2023-12-13 22:17:57 -05:00
lpfc_vmid.c scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes 2023-12-13 22:17:57 -05:00
lpfc_vport.c
lpfc_vport.h
Makefile