Skip to content

Commit

Permalink
scsi: qla2xxx: Don't call dma_free_coherent with IRQ disabled.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Giridhar Malavali authored and Martin K. Petersen committed Jan 4, 2018
1 parent 11aea16 commit 045d6ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 045d6ea

Please sign in to comment.