Skip to contentSkip to conversation

lpfc: drop nodelist reference on error in lpfc_gen_req()

PATCH Applied Hannes Reinecke 2 participants 3 messages Sep 10, 2020 – Oct 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lpfc: drop nodelist reference on error in lpfc_gen_req()

If we fail to issue the iocb in lpfc_gen_req() we need to drop the nodelist reference.

---
 drivers/scsi/lpfc/lpfc_ct.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/lpfc/lpfc_ct.c +2 -0
index ef2015fad2d5..c201686d3815 100644
@@ -387,6 +387,8 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp,
 	rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, geniocb, 0);
 
 	if (rc == IOCB_ERROR) {
+		geniocb->context_un.ndlp = NULL;
+		lpfc_nlp_put(ndlp);
 		lpfc_sli_release_iocbq(phba, geniocb);
 		return 1;
 	}
Signature · 1 line
2.16.4
#1 lore raw

Hannes,

Quoted 2 lines

If we fail to issue the iocb in lpfc_gen_req() we need to drop the nodelist reference.

Applied to 5.10/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering