scsi: lpfc: Fix NULL ptr dereference with NPIV ports for RDF handling
authorJames Smart <jsmart2021@gmail.com>
Wed, 7 Jul 2021 18:43:39 +0000 (11:43 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 19 Jul 2021 02:30:35 +0000 (22:30 -0400)
commit2d338eb55b14ab9d245e8b1d982adecca8c4c613
tree2885b250c1d9ca848abda403dcb5182738254dc1
parent4e670c8afd47d535f65edf0d2b7f54f103fd59a2
scsi: lpfc: Fix NULL ptr dereference with NPIV ports for RDF handling

RDF ELS handling for NPIV ports may result in an incorrect NDLP reference
count.  In the event of a persistent link down, this may lead to premature
release of an NDLP structure and subsequent NULL ptr dereference panic.

Remove extraneous lpfc_nlp_put() call in NPIV port RDF processing.

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