public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: bin.lan.cn@windriver.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.15.y] scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
Date: Wed, 23 Apr 2025 13:47:46 -0400	[thread overview]
Message-ID: <20250423124236-db305a4c20aa9e11@stable.kernel.org> (raw)
In-Reply-To: <20250423115644.1585421-1-bin.lan.cn@windriver.com>

[ 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 Smart<jsmart2021@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   |

      reply	other threads:[~2025-04-23 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 11:56 [PATCH 5.15.y] scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI bin.lan.cn
2025-04-23 17:47 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423124236-db305a4c20aa9e11@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=bin.lan.cn@windriver.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox