]> git.hungrycats.org Git - linux/commit
scsi: lpfc: Fix null ndlp ptr dereference in abnormal exit path for GFT_ID
authorJames Smart <jsmart2021@gmail.com>
Fri, 19 Aug 2022 01:17:31 +0000 (18:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:58:24 +0000 (09:58 +0200)
commit04e7cd8c85636a329d1a6e5a269a7c8b6f71c41c
treefab071b2c66579453767aa4317c0945f3281a742
parent1f7181ce5891f0362c57bfb07f0a81e1f3cde22c
scsi: lpfc: Fix null ndlp ptr dereference in abnormal exit path for GFT_ID

[ Upstream commit 59b7e210a522b836a01516c71ee85d1d92c1f075 ]

An error case exit from lpfc_cmpl_ct_cmd_gft_id() results in a call to
lpfc_nlp_put() with a null pointer to a nodelist structure.

Changed lpfc_cmpl_ct_cmd_gft_id() to initialize nodelist pointer upon
entry.

Link: https://lore.kernel.org/r/20220819011736.14141-3-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_ct.c