Patch "scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-lpfc-fix-crash-when-a-reg_rpi-mailbox-fails-tri.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5da535474e2d5c44515f06c8a6c4144e9c6d042f
Author: James Smart <jsmart2021@xxxxxxxxx>
Date:   Sun Apr 11 18:31:13 2021 -0700

    scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response
    
    [ Upstream commit fffd18ec6579c2d9c72b212169259062fe747888 ]
    
    Fix a crash caused by a double put on the node when the driver completed an
    ACC for an unsolicted abort on the same node.  The second put was executed
    by lpfc_nlp_not_used() and is wrong because the completion routine executes
    the nlp_put when the iocbq was released.  Additionally, the driver is
    issuing a LOGO then immediately calls lpfc_nlp_set_state to put the node
    into NPR.  This call does nothing.
    
    Remove the lpfc_nlp_not_used call and additional set_state in the
    completion routine.  Remove the lpfc_nlp_set_state post issue_logo.  Isn't
    necessary.
    
    Link: https://lore.kernel.org/r/20210412013127.2387-3-jsmart2021@xxxxxxxxx
    Co-developed-by: Justin Tee <justin.tee@xxxxxxxxxxxx>
    Signed-off-by: Justin Tee <justin.tee@xxxxxxxxxxxx>
    Signed-off-by: James Smart <jsmart2021@xxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 17be94496110..6afcb1426e35 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -1984,8 +1984,6 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,
 		ndlp->nlp_last_elscmd = ELS_CMD_PLOGI;
 
 		lpfc_issue_els_logo(vport, ndlp, 0);
-		ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE;
-		lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
 		return ndlp->nlp_state;
 	}
 
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index f103340820c6..5841d2523549 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -17836,7 +17836,6 @@ lpfc_sli4_seq_abort_rsp_cmpl(struct lpfc_hba *phba,
 	if (cmd_iocbq) {
 		ndlp = (struct lpfc_nodelist *)cmd_iocbq->context1;
 		lpfc_nlp_put(ndlp);
-		lpfc_nlp_not_used(ndlp);
 		lpfc_sli_release_iocbq(phba, cmd_iocbq);
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux