* [PATCH] scsi: qla2xxx: fix end of loop test
@ 2023-05-22 11:09 Dan Carpenter
2023-05-31 15:19 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-05-22 11:09 UTC (permalink / raw)
To: Quinn Tran
Cc: Nilesh Javali, GR-QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, Himanshu Madhani, linux-scsi, kernel-janitors
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>
---
drivers/scsi/qla2xxx/qla_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index bc89d3da8fd0..952fd2b5e6da 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1409,7 +1409,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;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: qla2xxx: fix end of loop test
2023-05-22 11:09 [PATCH] scsi: qla2xxx: fix end of loop test Dan Carpenter
@ 2023-05-31 15:19 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2023-05-31 15:19 UTC (permalink / raw)
To: Dan Carpenter
Cc: Quinn Tran, Nilesh Javali, GR-QLogic-Storage-Upstream,
James E.J. Bottomley, Martin K. Petersen, Himanshu Madhani,
linux-scsi, kernel-janitors
Dan,
> 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.
Applied to 6.5/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-31 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 11:09 [PATCH] scsi: qla2xxx: fix end of loop test Dan Carpenter
2023-05-31 15:19 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).