diff options
author | Arun Easi <arun.easi@qlogic.com> | 2013-03-25 02:21:37 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-04-06 06:30:16 -0400 |
commit | 00876ae85b47cdfe76aa08b1fffb27fd67425f53 (patch) | |
tree | 566e67e1d86f2280aad0f2337d7b52ad2955ca9f /drivers/scsi/qla2xxx | |
parent | e9f4f418076f7d08a73667472b5f74a02965221d (diff) |
[SCSI] qla2xxx: Fix crash during firmware dump procedure.
System crashes, in initiator mode operation, with
qla2xxx_copy_atioqueues() in stack trace when firmware dump is
attempted.
Check for atio_q_length alone does not indicate if atio_ring is
allocated, make explicit check of atio_ring to avoid the crash.
Applicable to ISP24xx, ISP25xx, ISP81xx & ISP83xx line of HBAs.
Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 2bf02147bcce..fbc305f1c87c 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -402,7 +402,7 @@ qla2xxx_copy_atioqueues(struct qla_hw_data *ha, void *ptr, | |||
402 | void *ring; | 402 | void *ring; |
403 | } aq, *aqp; | 403 | } aq, *aqp; |
404 | 404 | ||
405 | if (!ha->tgt.atio_q_length) | 405 | if (!ha->tgt.atio_ring) |
406 | return ptr; | 406 | return ptr; |
407 | 407 | ||
408 | num_queues = 1; | 408 | num_queues = 1; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 09eae54387fa..b59203393cb2 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1397,7 +1397,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) | |||
1397 | mq_size += ha->max_rsp_queues * | 1397 | mq_size += ha->max_rsp_queues * |
1398 | (rsp->length * sizeof(response_t)); | 1398 | (rsp->length * sizeof(response_t)); |
1399 | } | 1399 | } |
1400 | if (ha->tgt.atio_q_length) | 1400 | if (ha->tgt.atio_ring) |
1401 | mq_size += ha->tgt.atio_q_length * sizeof(request_t); | 1401 | mq_size += ha->tgt.atio_q_length * sizeof(request_t); |
1402 | /* Allocate memory for Fibre Channel Event Buffer. */ | 1402 | /* Allocate memory for Fibre Channel Event Buffer. */ |
1403 | if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha)) | 1403 | if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha)) |