Skip to content

Commit 78262dd

Browse files
author
Paul Ely
committed
scsi: lpfc: Skip RSCN processing when FC_UNLOADING flag is set
JIRA: https://issues.redhat.com/browse/RHEL-103751 commit 37c893e Author: Justin Tee <justin.tee@broadcom.com> Date: Wed Jun 18 12:21:29 2025 -0700 scsi: lpfc: Skip RSCN processing when FC_UNLOADING flag is set During rmmod, all ndlp objects are cleaned up and marked with the NLP_DROPPED flag indicating that an ndlp object is currently being released. Thus, if an RSCN is received during driver unload, then walking the fc_nodes list to process the RSCN is unnecessary because the ndlp objects are very shortly going to be released. In the lpfc_rscn_recovery_check routine, early return if the driver is in the middle of unloading by checking for the FC_UNLOADING flag. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20250618192138.124116-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Paul Ely <paely@redhat.com>
1 parent 935d1d9 commit 78262dd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7860,6 +7860,13 @@ lpfc_rscn_recovery_check(struct lpfc_vport *vport)
78607860

78617861
/* Move all affected nodes by pending RSCNs to NPR state. */
78627862
list_for_each_entry_safe(ndlp, n, &vport->fc_nodes, nlp_listp) {
7863+
if (test_bit(FC_UNLOADING, &vport->load_flag)) {
7864+
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
7865+
"1000 %s Unloading set\n",
7866+
__func__);
7867+
return 0;
7868+
}
7869+
78637870
if ((ndlp->nlp_state == NLP_STE_UNUSED_NODE) ||
78647871
!lpfc_rscn_payload_check(vport, ndlp->nlp_DID))
78657872
continue;

0 commit comments

Comments
 (0)