mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
qla2x00t-32gbit: Fix end of loop test
This loop will exit successfully when "found" is false or in the failure
case it times out with "wait_iter" set to -1. The test for timeouts is
impossible as is.
Fixes: b843adde8d49 ("scsi: qla2xxx: Fix mem access after free")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/cea5a62f-b873-4347-8f8e-c67527ced8d2@kili.mountain
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit 339020091e24 upstrema ]
This commit is contained in:
@@ -1450,7 +1450,7 @@ __qla2x00_eh_wait_for_pending_commands(struct qla_qpair *qpair, unsigned int t,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!wait_iter && found)
|
||||
if (wait_iter == -1)
|
||||
status = QLA_FUNCTION_FAILED;
|
||||
|
||||
return status;
|
||||
|
||||
Reference in New Issue
Block a user