diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2016-07-18 10:06:03 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-20 19:45:35 -0400 |
commit | 31979008fdae72d7441643f3a5b1bdaedf481335 (patch) | |
tree | baa9bddc227c9e608dce58edca20aff427ebcd04 | |
parent | fcbefc3b2bfb4dd1a230b3082b68bc7cf7c081e7 (diff) |
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: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c8fd0a349eba..351d08ace24a 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -10203,6 +10203,7 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vport, uint16_t tgt_id, uint64_t lun_id, | |||
10203 | struct lpfc_iocbq *iocbq; | 10203 | struct lpfc_iocbq *iocbq; |
10204 | int sum, i; | 10204 | int sum, i; |
10205 | 10205 | ||
10206 | spin_lock_irq(&phba->hbalock); | ||
10206 | for (i = 1, sum = 0; i <= phba->sli.last_iotag; i++) { | 10207 | for (i = 1, sum = 0; i <= phba->sli.last_iotag; i++) { |
10207 | iocbq = phba->sli.iocbq_lookup[i]; | 10208 | iocbq = phba->sli.iocbq_lookup[i]; |
10208 | 10209 | ||
@@ -10210,6 +10211,7 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vport, uint16_t tgt_id, uint64_t lun_id, | |||
10210 | ctx_cmd) == 0) | 10211 | ctx_cmd) == 0) |
10211 | sum++; | 10212 | sum++; |
10212 | } | 10213 | } |
10214 | spin_unlock_irq(&phba->hbalock); | ||
10213 | 10215 | ||
10214 | return sum; | 10216 | return sum; |
10215 | } | 10217 | } |