scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs
authorJames Smart <jsmart2021@gmail.com>
Fri, 14 May 2021 19:55:56 +0000 (12:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:49 +0000 (16:17 +0200)
commitfa169003381eece466df4ced7e18c1adf1dfa40c
tree6731459d6ba2e30d96342df3faca2610278f1944
parent21be6864028f28672b560f0d784dadc9c0b00301
scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs

[ Upstream commit 5aa615d195f1e142c662cb2253f057c9baec7531 ]

The driver is encountering a crash in lpfc_free_iocb_list() while
performing initial attachment.

Code review found this to be an errant failure path that was taken, jumping
to a tag that then referenced structures that were uninitialized.

Fix the failure path.

Link: https://lore.kernel.org/r/20210514195559.119853-9-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>
drivers/scsi/lpfc/lpfc_sli.c