From: Neil Brown <neilb@suse.de>
To: Nikanth Karthikesan <knikanth@novell.com>
Cc: mingo@redhat.com, linux-raid@vger.kernel.org
Subject: Re: [PATCH] linear: correct disk numbering error check
Date: Tue, 17 Jun 2008 08:54:27 +1000 [thread overview]
Message-ID: <18518.61219.83135.383069@notabene.brown> (raw)
In-Reply-To: message from Nikanth Karthikesan on Friday June 13
On Friday June 13, knikanth@novell.com wrote:
> Correct disk numbering problem check.
>
> Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Good catch, thanks for that!
NeilBrown
>
> ---
> diff --git a/drivers/md/linear.c b/drivers/md/linear.c
> index 1074824..ec921f5 100644
> --- a/drivers/md/linear.c
> +++ b/drivers/md/linear.c
> @@ -126,7 +126,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
> int j = rdev->raid_disk;
> dev_info_t *disk = conf->disks + j;
>
> - if (j < 0 || j > raid_disks || disk->rdev) {
> + if (j < 0 || j >= raid_disks || disk->rdev) {
> printk("linear: disk numbering problem. Aborting!\n");
> goto out;
> }
>
prev parent reply other threads:[~2008-06-16 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 8:37 [PATCH] linear: correct disk numbering error check Nikanth Karthikesan
2008-06-16 22:54 ` Neil Brown [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=18518.61219.83135.383069@notabene.brown \
--to=neilb@suse.de \
--cc=knikanth@novell.com \
--cc=linux-raid@vger.kernel.org \
--cc=mingo@redhat.com \
/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