diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2018-03-20 17:05:48 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-09 21:03:41 -0400 |
commit | 3a9910d7b686546dcc9986e790af17e148f1c888 (patch) | |
tree | 29d2ddf2e8ba4043865e6e1a2989ca2d3a421fbe | |
parent | 6d6340672ba3a99c4cf7af79c2edf7aa25595c84 (diff) |
scsi: qla2xxx: Avoid double completion of abort command
qla2x00_tmf_sp_done() now deletes the timer that will run
qla2x00_tmf_iocb_timeout(), but doesn't check whether the timer already
expired. Check the return value from del_timer() to avoid calling
complete() a second time.
Fixes: 4440e46d5db7 ("[SCSI] qla2xxx: Add IOCB Abort command asynchronous ...")
Fixes: 1514839b3664 ("scsi: qla2xxx: Fix NULL pointer crash due to active ...")
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 8aeb0ed524a1..a568266a44bf 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1550,8 +1550,8 @@ qla24xx_abort_sp_done(void *ptr, int res) | |||
1550 | srb_t *sp = ptr; | 1550 | srb_t *sp = ptr; |
1551 | struct srb_iocb *abt = &sp->u.iocb_cmd; | 1551 | struct srb_iocb *abt = &sp->u.iocb_cmd; |
1552 | 1552 | ||
1553 | del_timer(&sp->u.iocb_cmd.timer); | 1553 | if (del_timer(&sp->u.iocb_cmd.timer)) |
1554 | complete(&abt->u.abt.comp); | 1554 | complete(&abt->u.abt.comp); |
1555 | } | 1555 | } |
1556 | 1556 | ||
1557 | int | 1557 | int |