Browse Source

[SCSI] lpfc 8.3.39: Fixed deadlock between hbalock and nlp_lock use

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
James Smart 12 years ago
parent
commit
a62a435ada
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/scsi/lpfc/lpfc_hbadisc.c

+ 2 - 1
drivers/scsi/lpfc/lpfc_hbadisc.c

@@ -160,11 +160,12 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *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);