Skip to contentSkip to conversation

lpfc 8.3.39: Fixed deadlock between hbalock and nlp_lock use

PATCH New James Smart 1 participant 1 message Apr 18, 2013

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

PATCH 13/22 lpfc 8.3.39: Fixed deadlock between hbalock and nlp_lock use

Fixed deadlock between hbalock and nlp_lock use.

---

 lpfc_hbadisc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +2 -1
diff -upNr a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -160,11 +160,12 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport
 	if (!list_empty(&evtp->evt_listp))
 		return;
 
+	evtp->evt_arg1  = lpfc_nlp_get(ndlp);
+
 	spin_lock_irq(&phba->hbalock);
 	/* We need to hold the node by incrementing the reference
 	 * count until this queued work is done
 	 */
-	evtp->evt_arg1  = lpfc_nlp_get(ndlp);
 	if (evtp->evt_arg1) {
 		evtp->evt = LPFC_EVT_DEV_LOSS;
 		list_add_tail(&evtp->evt_listp, &phba->work_list);