diff options
author | Justin Tee <justin.tee@broadcom.com> | 2023-01-10 02:33:11 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-01-12 08:03:14 +0300 |
commit | ecdf4ddf4eb7a9135abdb358e98a8e6c1e8effe6 (patch) | |
tree | b4ce80aa7094f3d6bacdbe7baf9d77ad6d23f631 /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | f81395570e6c08ec1ef11eda433856c1a6805077 (diff) | |
download | linux-ecdf4ddf4eb7a9135abdb358e98a8e6c1e8effe6.tar.xz |
scsi: lpfc: Remove duplicate ndlp kref decrement in lpfc_cleanup_rpis()
With faulty cables in PT2PT topology, an unintentional ndlp double kref
decrement can occur.
If a FLOGI request is outstanding before the link goes down, the missing
FLOGI_ACC causes an F_Port ndlp to remain in the UNUSED state. During link
down, lpfc_cleanup_rpis() is called and decrements an ndlp kref.
Additionally, when the driver later decides to abort the FLOGI, the FLOGI
completion handler decrements the ndlp kref a second time.
Remove duplicate clean up logic in lpfc_cleanup_rpis() because the updated
FLOGI completion handler already handles the ndlp kref decrement.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 80375d73b732..af0acf55b343 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1129,21 +1129,6 @@ lpfc_cleanup_rpis(struct lpfc_vport *vport, int remove) struct lpfc_nodelist *ndlp, *next_ndlp; list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { - if (ndlp->nlp_state == NLP_STE_UNUSED_NODE) { - /* It's possible the FLOGI to the fabric node never - * successfully completed and never registered with the - * transport. In this case there is no way to clean up - * the node. - */ - if (ndlp->nlp_DID == Fabric_DID) { - if (ndlp->nlp_prev_state == - NLP_STE_UNUSED_NODE && - !ndlp->fc4_xpt_flags) - lpfc_nlp_put(ndlp); - } - continue; - } - if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) || ((vport->port_type == LPFC_NPIV_PORT) && ((ndlp->nlp_DID == NameServer_DID) || |