]> git.itanic.dy.fi Git - linux-stable/commit
scsi: bnx2fc: Fix check in SCSI completion handler for timed out request
authorChad Dupuis <chad.dupuis@cavium.com>
Wed, 24 Jan 2018 16:07:06 +0000 (08:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:13:06 +0000 (16:13 +0200)
commitac6572952cbbac58381636a7e28cb57fffe90adb
tree7f8768d161a149618d581e7c3e6fc46657a9cd9a
parent9760af4d2eca3e836b43de41f4108b582ff7c02b
scsi: bnx2fc: Fix check in SCSI completion handler for timed out request

[ Upstream commit ecf7ff49945f5741fa1da112f994939f942031d3 ]

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>
drivers/scsi/bnx2fc/bnx2fc_io.c