linux-stable/drivers/scsi/lpfc
Justin Tee 07a2aa674f 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:07:34 +02:00
..
Makefile
lpfc.h scsi: lpfc: Fix possible file string name overflow when updating firmware 2024-02-05 20:14:19 +00:00
lpfc_attr.c scsi: lpfc: Clean up SLI-4 sysfs resource reporting 2023-07-23 16:17:08 -04:00
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Correct size for cmdwqe/rspwqe for memset() 2024-04-03 15:29:03 +02:00
lpfc_bsg.h
lpfc_compat.h
lpfc_crtn.h
lpfc_ct.c scsi: lpfc: Make fabric zone discovery more robust when handling unsolicited LOGO 2023-07-23 16:17:07 -04:00
lpfc_debugfs.c scsi: lpfc: Fix the NULL vs IS_ERR() bug for debugfs_create_file() 2023-09-13 20:48:36 -04:00
lpfc_debugfs.h
lpfc_disc.h
lpfc_els.c scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes 2024-02-05 20:14:23 +00:00
lpfc_hbadisc.c scsi: lpfc: Prevent use-after-free during rmmod with mapped NVMe rports 2023-09-13 20:51:16 -04:00
lpfc_hw.h scsi: lpfc: Set Establish Image Pair service parameter only for Target Functions 2023-07-23 16:17:07 -04:00
lpfc_hw4.h
lpfc_ids.h
lpfc_init.c scsi: lpfc: Fix possible file string name overflow when updating firmware 2024-02-05 20:14:19 +00:00
lpfc_logmsg.h
lpfc_mbox.c
lpfc_mem.c
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc() 2024-04-13 13:07:34 +02:00
lpfc_nvme.c scsi: lpfc: Prevent use-after-free during rmmod with mapped NVMe rports 2023-09-13 20:51:16 -04:00
lpfc_nvme.h
lpfc_nvmet.c scsi: lpfc: Correct size for wqe for memset() 2024-04-03 15:29:03 +02:00
lpfc_scsi.c scsi: lpfc: Use unsigned type for num_sge 2024-03-01 13:34:55 +01:00
lpfc_scsi.h
lpfc_sli.c scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected 2023-07-23 16:17:07 -04:00
lpfc_sli.h
lpfc_sli4.h
lpfc_version.h scsi: lpfc: Update lpfc version to 14.2.0.14 2023-07-23 16:17:08 -04:00
lpfc_vmid.c scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes 2024-02-05 20:14:23 +00:00
lpfc_vport.c
lpfc_vport.h