Skip to content

Commit

Permalink
iscsi-target: forever loop bug in iscsit_attach_ooo_cmdsn()
Browse files Browse the repository at this point in the history
This patch fixes a forever loop bug in iscsit_attach_ooo_cmdsn()
while walking sess->sess_ooo_cmdsn_list when the received
CmdSN is less than the tail of the list.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Dan Carpenter authored and Nicholas Bellinger committed Aug 22, 2011
1 parent c2337c7 commit 387e96c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_erl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ static int iscsit_attach_ooo_cmdsn(
*/
list_for_each_entry(ooo_tmp, &sess->sess_ooo_cmdsn_list,
ooo_list) {
while (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn)
if (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn)
continue;

list_add(&ooo_cmdsn->ooo_list,
Expand Down

0 comments on commit 387e96c

Please sign in to comment.