Skip to contentSkip to conversation

lpfc: fix refcount error on node list

PATCH Applied James Smart 3 participants 3 messages Jun 21, 2017 – Jun 26, 2017

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

PATCH 1/1 lpfc: fix refcount error on node list

A change in remote port removal introduced a spurious put which can cause a premature structure teardown. The affects were most notable when the driver attempted to unload as a null pointer would be hit.

Fix by removing the unnecessary put.

---
 drivers/scsi/lpfc/lpfc_init.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +0 -7
index 7e73fdc154f7..491aa95eb0f6 100644
@@ -2805,13 +2805,6 @@ lpfc_cleanup(struct lpfc_vport *vport)
 			lpfc_disc_state_machine(vport, ndlp, NULL,
 					NLP_EVT_DEVICE_RECOVERY);
 
-		if (ndlp->nlp_fc4_type & NLP_FC4_NVME) {
-			/* Remove the NVME transport reference now and
-			 * continue to remove the node.
-			 */
-			lpfc_nlp_put(ndlp);
-		}
-
 		lpfc_disc_state_machine(vport, ndlp, NULL,
 					     NLP_EVT_DEVICE_RM);
 	}
Signature · 1 line
2.11.0
#2 lore raw
In reply to James Smart

James,

Quoted 5 lines

A change in remote port removal introduced a spurious put which can cause a premature structure teardown. The affects were most notable when the driver attempted to unload as a null pointer would be hit.

Fix by removing the unnecessary put.

Applied to 4.13/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering