Re: [PATCH] qla2xxx: Avoid double completion of abort command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ben, 

> On Mar 20, 2018, at 2:05 PM, Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx> wrote:
> 
> 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@xxxxxxxxxxxxxxx>
> ---
> drivers/scsi/qla2xxx/qla_init.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 00329dda6179..b0aa8cc96f0f 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -1546,8 +1546,8 @@ qla24xx_abort_sp_done(void *ptr, int res)
> 	srb_t *sp = ptr;
> 	struct srb_iocb *abt = &sp->u.iocb_cmd;
> 
> -	del_timer(&sp->u.iocb_cmd.timer);
> -	complete(&abt->u.abt.comp);
> +	if (del_timer(&sp->u.iocb_cmd.timer))
> +		complete(&abt->u.abt.comp);
> }
> 
> int
> -- 
> 2.15.0.rc0
> 

Looks good.

Acked-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>

Thanks,
- Himanshu





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux