From: Gleb C. <lna...@ya...> - 2023-07-19 08:38:27
|
Commit: d26ab07 GitHub URL: https://github.com/SCST-project/scst/commit/d26ab07ae97c9a877fefb3badb5a2dba03bb15cd Author: Gleb Chesnokov Date: 2023-07-19T11:35:51+03:00 Log Message: ----------- 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...@li...> Link: https://lore.kernel.org/r/cea...@ki...untain Signed-off-by: Martin K. Petersen <mar...@or...> [ commit 339020091e24 upstrema ] Modified Paths: -------------- qla2x00t-32gbit/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index e08ddac..7bd76e8 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -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; |