Skip to content

Commit fec55ec

Browse files
Dan Carpentergregkh
authored andcommitted
scsi: qla2xxx: Fix end of loop test
commit 3390200 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: b843add ("scsi: qla2xxx: Fix mem access after free") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f459d58 commit fec55ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ __qla2x00_eh_wait_for_pending_commands(struct qla_qpair *qpair, unsigned int t,
13991399
break;
14001400
}
14011401

1402-
if (!wait_iter && found)
1402+
if (wait_iter == -1)
14031403
status = QLA_FUNCTION_FAILED;
14041404

14051405
return status;

0 commit comments

Comments
 (0)