[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: 577a942df3de2666f6947bdd3a5c9e8d30073424
WARNING: Author mismatch between patch and upstream commit: Backport author: bin.lan.cn@windriver.com Commit author: James Smartjsmart2021@gmail.com
Status in newer kernel trees: 6.14.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1) 6.1.y | Present (exact SHA1)
Note: The patch differs from the upstream commit: --- 1: 577a942df3de2 ! 1: 84e3972d52302 scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI @@ Metadata ## Commit message ## scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
+ [ Upstream commit 577a942df3de2666f6947bdd3a5c9e8d30073424 ] + If lpfc_issue_els_flogi() fails and returns non-zero status, the node reference count is decremented to trigger the release of the nodelist structure. However, if there is a prior registration or dev-loss-evt work @@ Commit message Signed-off-by: Justin Tee justin.tee@broadcom.com Signed-off-by: James Smart jsmart2021@gmail.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com + [Minor context change fixed.] + Signed-off-by: Bin Lan bin.lan.cn@windriver.com + Signed-off-by: He Zhe zhe.he@windriver.com
## drivers/scsi/lpfc/lpfc_els.c ## @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_initial_flogi(struct lpfc_vport *vport) - /* Reset the Fabric flag, topology change may have happened */ - vport->fc_flag &= ~FC_FABRIC; + } + if (lpfc_issue_els_flogi(vport, ndlp, 0)) { - /* This decrement of reference count to node shall kick off - * the release of the node. @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_initial_fdisc(struct lpfc_vport *vport) } return 1; @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, + struct lpfc_dmabuf *prsp; int disc; struct serv_parm *sp = NULL; - u32 ulp_status, ulp_word4, did, iotag; + bool release_node = false;
/* we pass cmdiocb to state machine which needs rspiocb as well */ @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct /* Good status, call state machine */ prsp = list_entry(((struct lpfc_dmabuf *) @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, + struct lpfc_nodelist *ndlp; + char *mode; u32 loglevel; - u32 ulp_status; - u32 ulp_word4; + bool release_node = false;
/* we pass cmdiocb to state machine which needs rspiocb as well */ @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct l /* Good status, call state machine. However, if another * PRLI is outstanding, don't call the state machine @@ drivers/scsi/lpfc/lpfc_els.c: lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, + IOCB_t *irsp; struct lpfc_nodelist *ndlp; int disc; - u32 ulp_status, ulp_word4, tmo; + bool release_node = false;
/* we pass cmdiocb to state machine which needs rspiocb as well */ ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.15.y | Success | Success |