From: Joe Eykholt <jeykholt@cisco.com>
To: Dan Carpenter <error27@gmail.com>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>,
linux-scsi@vger.kernel.org
Subject: Re: [patch] off by one in FlashPoint.c
Date: Mon, 28 Dec 2009 12:14:39 -0500 [thread overview]
Message-ID: <4B38E77F.2070201@cisco.com> (raw)
In-Reply-To: <20091227131446.GI6075@bicker>
Dan Carpenter wrote:
> The check should be >= instead of > or we could go past the end of the
> array.
What about the LUN check? I'm not sure either way, but usually MAX LUN
is the max number of LUNs, not the max LU number, although that's been
in flux lately.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> --- orig/drivers/scsi/FlashPoint.c 2009-12-27 11:35:58.000000000 +0200
> +++ devel/drivers/scsi/FlashPoint.c 2009-12-27 11:36:19.000000000 +0200
> @@ -3924,7 +3924,7 @@
> {
> struct sccb_mgr_tar_info *currTar_Info;
>
> - if ((p_sccb->TargID > MAX_SCSI_TAR) || (p_sccb->Lun > MAX_LUN)) {
> + if ((p_sccb->TargID >= MAX_SCSI_TAR) || (p_sccb->Lun > MAX_LUN)) {
> return;
> }
> currTar_Info = &FPT_sccbMgrTbl[p_card][p_sccb->TargID];
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-12-28 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-27 13:14 [patch] off by one in FlashPoint.c Dan Carpenter
2009-12-28 17:14 ` Joe Eykholt [this message]
2009-12-28 18:03 ` Dan Carpenter
2009-12-28 18:08 ` [patch] off by one in FlashPoint.c (v2) Dan Carpenter
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=4B38E77F.2070201@cisco.com \
--to=jeykholt@cisco.com \
--cc=James.Bottomley@suse.de \
--cc=error27@gmail.com \
--cc=linux-scsi@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