Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31979008 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Martin K. Petersen
Browse files

lpfc: call lpfc_sli_validate_fcp_iocb() with the hbalock held



Call lpfc_sli_validate_fcp_iocb() with the hbalock held, as the pointer
to iocbq is not guaranteed to still be valid after looking it up.

Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarLaurence Oberman <loberman@redhat.com>
Acked-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fcbefc3b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10203,6 +10203,7 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vport, uint16_t tgt_id, uint64_t lun_id,
	struct lpfc_iocbq *iocbq;
	int sum, i;
	spin_lock_irq(&phba->hbalock);
	for (i = 1, sum = 0; i <= phba->sli.last_iotag; i++) {
		iocbq = phba->sli.iocbq_lookup[i];
@@ -10210,6 +10211,7 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vport, uint16_t tgt_id, uint64_t lun_id,
						ctx_cmd) == 0)
			sum++;
	}
	spin_unlock_irq(&phba->hbalock);
	return sum;
}