Unverified Commit 6d378d81 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!8479 scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()

parents 70384271 c1d0299d
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -3636,23 +3636,23 @@ lpfc_els_retry_delay(struct timer_list *t)
	unsigned long flags;
	struct lpfc_work_evt  *evtp = &ndlp->els_retry_evt;

	/* Hold a node reference for outstanding queued work */
	if (!lpfc_nlp_get(ndlp))
		return;

	spin_lock_irqsave(&phba->hbalock, flags);
	if (!list_empty(&evtp->evt_listp)) {
		spin_unlock_irqrestore(&phba->hbalock, flags);
		lpfc_nlp_put(ndlp);
		return;
	}

	/* We need to hold the node by incrementing the reference
	 * count until the queued work is done
	 */
	evtp->evt_arg1  = lpfc_nlp_get(ndlp);
	if (evtp->evt_arg1) {
	evtp->evt_arg1 = ndlp;
	evtp->evt = LPFC_EVT_ELS_RETRY;
	list_add_tail(&evtp->evt_listp, &phba->work_list);
		lpfc_worker_wake_up(phba);
	}
	spin_unlock_irqrestore(&phba->hbalock, flags);
	return;

	lpfc_worker_wake_up(phba);
}

/**
+2 −0
Original line number Diff line number Diff line
@@ -184,7 +184,9 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
	if (evtp->evt_arg1) {
		evtp->evt = LPFC_EVT_DEV_LOSS;
		list_add_tail(&evtp->evt_listp, &phba->work_list);
		spin_unlock_irqrestore(&phba->hbalock, iflags);
		lpfc_worker_wake_up(phba);
		return;
	}
	spin_unlock_irqrestore(&phba->hbalock, iflags);

+7 −7
Original line number Diff line number Diff line
@@ -1100,9 +1100,9 @@ lpfc_set_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
	empty = list_empty(&phba->active_rrq_list);
	list_add_tail(&rrq->list, &phba->active_rrq_list);
	phba->hba_flag |= HBA_RRQ_ACTIVE;
	spin_unlock_irqrestore(&phba->hbalock, iflags);
	if (empty)
		lpfc_worker_wake_up(phba);
	spin_unlock_irqrestore(&phba->hbalock, iflags);
	return 0;
out:
	spin_unlock_irqrestore(&phba->hbalock, iflags);
@@ -10379,18 +10379,18 @@ lpfc_sli_post_recovery_event(struct lpfc_hba *phba,
	unsigned long iflags;
	struct lpfc_work_evt  *evtp = &ndlp->recovery_evt;
	/* Hold a node reference for outstanding queued work */
	if (!lpfc_nlp_get(ndlp))
		return;
	spin_lock_irqsave(&phba->hbalock, iflags);
	if (!list_empty(&evtp->evt_listp)) {
		spin_unlock_irqrestore(&phba->hbalock, iflags);
		lpfc_nlp_put(ndlp);
		return;
	}
	/* Incrementing the reference count until the queued work is done. */
	evtp->evt_arg1  = lpfc_nlp_get(ndlp);
	if (!evtp->evt_arg1) {
		spin_unlock_irqrestore(&phba->hbalock, iflags);
		return;
	}
	evtp->evt_arg1 = ndlp;
	evtp->evt = LPFC_EVT_RECOVER_PORT;
	list_add_tail(&evtp->evt_listp, &phba->work_list);
	spin_unlock_irqrestore(&phba->hbalock, iflags);