Re: [PATCH 2/2] qla2xxx: Remove entry in outstanding_cmds array if we fail to abort a request.

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

 



Hi James,
After further review of this patch please do not include it for 3.12-rc.

Thanks,
~Saurav

>From: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
>
>If the call to abort a request fails we need to clear it's entry in the
>in-flight
>commands array as it won't be cleared in interrupt context.  Not doing so
>could
>potentially lead to a double completion.
>
>Signed-off-by: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
>Signed-off-by: Saurav Kashyap <saurav.kashyap@xxxxxxxxxx>
>---
> drivers/scsi/qla2xxx/qla_os.c |    8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
>index 9f01bbb..66ed1c9 100644
>--- a/drivers/scsi/qla2xxx/qla_os.c
>+++ b/drivers/scsi/qla2xxx/qla_os.c
>@@ -951,6 +951,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
> 	unsigned long flags;
> 	int wait = 0;
> 	struct qla_hw_data *ha = vha->hw;
>+	uint32_t handle = 0;
> 
> 	if (!CMD_SP(cmd))
> 		return SUCCESS;
>@@ -989,7 +990,14 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
> 	}
> 
> 	spin_lock_irqsave(&ha->hardware_lock, flags);
>+	handle = sp->handle;
> 	sp->done(ha, sp, 0);
>+	/*
>+	 * If the mailbox command failed, clear the entry in the in-flight
>+	 * commands array as the entry won't be cleared in interrupt context.
>+	 */
>+	if (ret == FAILED)
>+		vha->req->outstanding_cmds[handle] = NULL;
> 	spin_unlock_irqrestore(&ha->hardware_lock, flags);
> 
> 	/* Did the command return during mailbox execution? */
>-- 
>1.7.7
>

<<attachment: winmail.dat>>


[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