From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Andy Grover <agrover@redhat.com>,
Roland Dreier <roland@kernel.org>, Christoph Hellwig <hch@lst.de>,
"open list:TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
"open list:TARGET SUBSYSTEM" <target-devel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] iscsi-target: forever loop in iscsit_attach_ooo_cmdsn()
Date: Mon, 08 Aug 2011 21:07:35 +0000 [thread overview]
Message-ID: <1312837655.12502.87.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20110806143206.GF10373@mwanda>
On Sat, 2011-08-06 at 07:32 -0700, Dan Carpenter wrote:
> I was looking through the code for something unrelated and noticed
> what looks like a forever loop here.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> I am not familiar with the subsystem and haven't tested this, so
> please review carefully.
>
> diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
> index 9806507..c4c68da 100644
> --- a/drivers/target/iscsi/iscsi_target_erl1.c
> +++ b/drivers/target/iscsi/iscsi_target_erl1.c
> @@ -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,
> --
Mmmm, good catch. I think this bogus while loop usage is left over from
the pre sess->sess_ooo_cmd_list conversion, and it's definately not what
the original logic is doing.
Committed as e7851a0e73de into lio-core-2.6.git.
Thanks Dan!
--nab
prev parent reply other threads:[~2011-08-08 21:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 14:32 [patch] iscsi-target: forever loop in iscsit_attach_ooo_cmdsn() Dan Carpenter
2011-08-08 21:07 ` Nicholas A. Bellinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312837655.12502.87.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=agrover@redhat.com \
--cc=error27@gmail.com \
--cc=hch@lst.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=roland@kernel.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox