]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix additional reference counting in lpfc_bsg_rport_els()
authorJames Smart <jsmart2021@gmail.com>
Wed, 27 Apr 2022 22:21:58 +0000 (15:21 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 2 May 2022 20:59:11 +0000 (16:59 -0400)
commitb3345e1cd56a2a2c0715d26e66bfd45a943b9492
tree6623abfa5a2032f6cd5c3f764e3cb1c476f3f031
parentb07787cb903ebd015c2cea340fae6e434fce39d8
scsi: lpfc: Fix additional reference counting in lpfc_bsg_rport_els()

Code inspection has found an additional reference is taken in
lpfc_bsg_rport_els(). Results in the ndlp not being freed thus is leaked.

Fix by removing the redundant refcount taken before WQE submission.

Link: https://lore.kernel.org/r/20220427222158.57867-1-jsmart2021@gmail.com
Co-developed-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c