]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
authorJustin Tee <justin.tee@broadcom.com>
Fri, 31 Jan 2025 00:05:22 +0000 (16:05 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 4 Feb 2025 02:53:22 +0000 (21:53 -0500)
commit56c3d809b7b450379162d0b8a70bbe71ab8db706
tree49e78a55dd8dba53b887ce713bf1794d57adc941
parent23ed62897746f49f195d819ce6edeb1db27d1b72
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine

After a port swap between separate fabrics, there may be multiple nodes in
the vport's fc_nodes list with the same fabric well known address.
Duplication is temporary and eventually resolves itself after dev_loss_tmo
expires, but nameserver queries may still occur before dev_loss_tmo.  This
possibly results in returning stale fabric ndlp objects.  Fix by adding an
nlp_state check to ensure the ndlp search routine returns the correct newer
allocated ndlp fabric object.

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