]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: qla2xxx: Fix race between switch cmd completion and timeout
authorQuinn Tran <quinn.tran@cavium.com>
Thu, 2 Aug 2018 20:16:54 +0000 (13:16 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Aug 2018 20:56:18 +0000 (16:56 -0400)
commitf6145e86d21fccd59bbb87bc1e1eb076658fd79a
tree41edd1622ea0d380cdeabe672aff4ee00618b26e
parentf6602f3befbb9979cdb031e32211358dd008d05e
scsi: qla2xxx: Fix race between switch cmd completion and timeout

Fix race condition between switch cmd completion and timeout timer. Timer
has popped triggers command free. On IOCB completion, stale sp point was
reused. Instead, an abort will be sent to FW to nudge the command out of FW
where the normal completion will take place.

RIP: 0010:qla2x00_chk_ms_status+0xf3/0x1b0 [qla2xxx]
Call Trace:
<IRQ>
qla24xx_els_ct_entry.isra.15+0x1d4/0x2b0 [qla2xxx]
 qla24xx_msix_rsp_q+0x39/0xf0 [qla2xxx]
qla24xx_process_response_queue+0xbc/0x2b0 [qla2xxx]
qla24xx_msix_rsp_q+0x8a/0xf0 [qla2xxx]
__handle_irq_event_percpu+0xa0/0x1f0

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_init.c