Commit ecf7ff49 authored by Chad Dupuis's avatar Chad Dupuis Committed by Martin K. Petersen

scsi: bnx2fc: Fix check in SCSI completion handler for timed out request

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.

[mkp: typo plus title shortening]
Signed-off-by: default avatarChad Dupuis <chad.dupuis@cavium.com>
Reviewed-by: default avatarLaurence Oberman <loberman@redhat.com>
Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 52797a1d
...@@ -1889,6 +1889,7 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req, ...@@ -1889,6 +1889,7 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
/* we will not receive ABTS response for this IO */ /* we will not receive ABTS response for this IO */
BNX2FC_IO_DBG(io_req, "Timer context finished processing " BNX2FC_IO_DBG(io_req, "Timer context finished processing "
"this scsi cmd\n"); "this scsi cmd\n");
return;
} }
/* Cancel the timeout_work, as we received IO completion */ /* Cancel the timeout_work, as we received IO completion */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment