From: Laurence Oberman <loberman@redhat.com>
To: Chad Dupuis <chad.dupuis@cavium.com>, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org,
james.bottomley@hansenpartnership.com,
QLogic-Storage-Upstream@cavium.com
Subject: Re: [PATCH] bnx2fc: Fix check in SCSI completion handler when reqeust has already timed out.
Date: Wed, 24 Jan 2018 11:12:12 -0500 [thread overview]
Message-ID: <1516810332.30372.1.camel@redhat.com> (raw)
In-Reply-To: <20180124160706.32700-1-chad.dupuis@cavium.com>
On Wed, 2018-01-24 at 08:07 -0800, Chad Dupuis wrote:
> When a request times out we set the io_req flag BNX2FC_FLAG_IO_COMPL
> so
> that if a subsequent completion comes in on that task ID we will
> ignore
> it. The issue is that in the check for this flag there is a missing
> return so we will continue to process a request which may have
> already
> been returned to the ownership of the SCSI layer. This can cause
> unpredictable results.
>
> Solution is to add in the missing return.
>
> Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
> ---
> drivers/scsi/bnx2fc/bnx2fc_io.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c
> b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 8e2f767147cb..5a645b8b9af1 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1889,6 +1889,7 @@ void bnx2fc_process_scsi_cmd_compl(struct
> bnx2fc_cmd *io_req,
> /* we will not receive ABTS response for this IO */
> BNX2FC_IO_DBG(io_req, "Timer context finished
> processing "
> "this scsi cmd\n");
> + return;
> }
>
> /* Cancel the timeout_work, as we received IO completion */
Hello
This was added after the race showed up for the first issue we fixed.
Its been running stable in our lab and at the customer.
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Thanks
Laurence
next prev parent reply other threads:[~2018-01-24 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 16:07 [PATCH] bnx2fc: Fix check in SCSI completion handler when reqeust has already timed out Chad Dupuis
2018-01-24 16:12 ` Laurence Oberman [this message]
2018-01-31 2:26 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516810332.30372.1.camel@redhat.com \
--to=loberman@redhat.com \
--cc=QLogic-Storage-Upstream@cavium.com \
--cc=chad.dupuis@cavium.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox