linux-stable/drivers/scsi/lpfc
Justin Tee ee0b5f96b6 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:05:06 +02:00
..
Makefile
lpfc.h scsi: lpfc: Fix possible file string name overflow when updating firmware 2024-02-05 20:12:50 +00:00
lpfc_attr.c
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Correct size for cmdwqe/rspwqe for memset() 2024-04-03 15:19:54 +02:00
lpfc_bsg.h
lpfc_compat.h
lpfc_crtn.h scsi: lpfc: Fix double free in lpfc_cmpl_els_logo_acc() caused by lpfc_nlp_not_used() 2023-07-23 13:49:38 +02:00
lpfc_ct.c
lpfc_debugfs.c scsi: lpfc: Fix the NULL vs IS_ERR() bug for debugfs_create_file() 2023-09-23 11:11:09 +02:00
lpfc_debugfs.h
lpfc_disc.h
lpfc_els.c scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected 2023-09-23 11:11:06 +02:00
lpfc_hbadisc.c scsi: lpfc: Fix double free in lpfc_cmpl_els_logo_acc() caused by lpfc_nlp_not_used() 2023-07-23 13:49:38 +02:00
lpfc_hw.h
lpfc_hw4.h
lpfc_ids.h
lpfc_init.c scsi: lpfc: Fix possible file string name overflow when updating firmware 2024-02-05 20:12:50 +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:05:06 +02:00
lpfc_nvme.c
lpfc_nvme.h
lpfc_nvmet.c scsi: lpfc: Correct size for wqe for memset() 2024-04-03 15:19:54 +02:00
lpfc_scsi.c scsi: lpfc: Use unsigned type for num_sge 2024-03-01 13:26:30 +01:00
lpfc_scsi.h
lpfc_sli.c scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected 2023-09-23 11:11:06 +02:00
lpfc_sli.h
lpfc_sli4.h
lpfc_version.h
lpfc_vmid.c
lpfc_vport.c
lpfc_vport.h