]> www.infradead.org Git - users/willy/xarray.git/commit
scsi: lpfc: Fix unsolicited FLOGI kref imbalance when in direct attached topology
authorJustin Tee <justin.tee@broadcom.com>
Fri, 26 Jul 2024 23:15:09 +0000 (16:15 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 3 Aug 2024 01:48:05 +0000 (21:48 -0400)
commitb5c18c9dd138733c16893613345af44deadcf05e
tree56db97fbcebec977cfb1553860143c1a5acfd1e3
parent3976beb1b410441bab9c3726e2ba76cc7a4c0b2d
scsi: lpfc: Fix unsolicited FLOGI kref imbalance when in direct attached topology

In direct attached topology, certain target vendors that are quick to issue
FLOGI followed by a cable pull for more than dev_loss_tmo may result in a
kref imbalance for the remote port ndlp object.

Add an nlp_get when the defer_flogi_acc flag is set.  This is expected to
balance the nlp_put in the defer_flogi_acc clause in the
lpfc_issue_els_flogi() routine.  Because we need to retain the ndlp ptr,
reorganize all of the defer_flogi_acc information into one
lpfc_defer_flogi_acc struct.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240726231512.92867-6-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c