Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Arun Easi and committed by
James Bottomley
00876ae8 e9f4f418

+2 -2
+1 -1
drivers/scsi/qla2xxx/qla_dbg.c
··· 402 402 void *ring; 403 403 } aq, *aqp; 404 404 405 - if (!ha->tgt.atio_q_length) 405 + if (!ha->tgt.atio_ring) 406 406 return ptr; 407 407 408 408 num_queues = 1;
+1 -1
drivers/scsi/qla2xxx/qla_init.c
··· 1397 1397 mq_size += ha->max_rsp_queues * 1398 1398 (rsp->length * sizeof(response_t)); 1399 1399 } 1400 - if (ha->tgt.atio_q_length) 1400 + if (ha->tgt.atio_ring) 1401 1401 mq_size += ha->tgt.atio_q_length * sizeof(request_t); 1402 1402 /* Allocate memory for Fibre Channel Event Buffer. */ 1403 1403 if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha))