]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Fix end of loop test
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 22 May 2023 11:09:17 +0000 (14:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:49 +0000 (13:49 +0200)
commitfec55ec03545ca772206ae30dbc59af853d5f6fc
treebef75ccfdc3901985ca3ffa6cff8916e1ac6b575
parentf459d586fdf12c53116c9fddf43065165fdd5969
scsi: qla2xxx: Fix end of loop test

commit 339020091e246e708c1381acf74c5f8e3fe4d2b5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_os.c