mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-08 09:39:40 +00:00
scsi: bnx2fc: Fix check in SCSI completion handler for timed out request
[ Upstream commit ecf7ff4994
]
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: Chad Dupuis <chad.dupuis@cavium.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
af99306224
commit
a1ac3da843
1 changed files with 1 additions and 0 deletions
|
@ -1865,6 +1865,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 */
|
||||
|
|
Loading…
Reference in a new issue