summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorGiridhar Malavali <giridhar.malavali@cavium.com>2017-12-28 12:33:21 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-03 23:41:05 -0500
commit045d6ea200af794ba15515984cff63787a7fc3c0 (patch)
treedbbb9c34fbae857e7f8307bd53e9c6fae019670c /drivers/scsi
parent11aea16ab3f5404895146e7aa722e2e9b5bc3b76 (diff)
scsi: qla2xxx: Don't call dma_free_coherent with IRQ disabled.
The logo ELS command allocates dma coherent memory for the data payload and serialize the completions. When this command times out, the timeout routine completes the thread waiting for completion which in turn cleanup resources allocated for this ELS command processing. Don't call generic sp->free routine when this ELS command times out to avoid to double freeing of the same resources. Signed-off-by: Giridhar Malavali <giridhar.malavali@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 56bff7856cf8..4e6d3eb4caa4 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -59,7 +59,8 @@ qla2x00_sp_timeout(struct timer_list *t)
req->outstanding_cmds[sp->handle] = NULL;
iocb = &sp->u.iocb_cmd;
iocb->timeout(sp);
- sp->free(sp);
+ if (sp->type != SRB_ELS_DCMD)
+ sp->free(sp);
spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
}