From: Neil Brown <neilb@suse.de>
To: Andy Isaacson <adi@hexapodia.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] fix read past end of array in md/linear.c
Date: Mon, 12 Mar 2007 10:05:52 +1100 [thread overview]
Message-ID: <17908.35664.68737.48529@notabene.brown> (raw)
In-Reply-To: message from Andy Isaacson on Thursday March 8
On Thursday March 8, adi@hexapodia.org wrote:
> On Thu, Mar 08, 2007 at 12:52:04PM -0800, Andy Isaacson wrote:
> > Index: linus/drivers/md/linear.c
> > ===================================================================
> > --- linus.orig/drivers/md/linear.c 2007-03-02 11:35:55.000000000 -0800
> > +++ linus/drivers/md/linear.c 2007-03-07 13:10:30.000000000 -0800
> > @@ -188,7 +188,7 @@
> > for (i=0; i < cnt-1 ; i++) {
> > sector_t sz = 0;
> > int j;
> > - for (j=i; i<cnt-1 && sz < min_spacing ; j++)
> > + for (j=i; j<cnt-1 && sz < min_spacing ; j++)
> > sz += conf->disks[j].size;
> > if (sz >= min_spacing && sz < conf->hash_spacing)
> > conf->hash_spacing = sz;
>
> Forgot to add:
>
> Signed-off-by: Andrew Isaacson <adi@hexapodia.org>
And
Acked-by: NeilBrown <neilb@suse.de>
Thanks!
I would have replied earlier but I wanted to make sure I understood
exactly what the possible consequences of this bug were.. and they are
quite benign.
The worst possible outcome is going so far off the end of the array
that you hit un-mapped memory and Oops.
If that doesn't happen, then the next worst option is that the hash
table is sized poorly and you spend a few more cycles than needed
choosing the target device for the request (we still always choose the
right device).
Thanks,
NeilBrown
next prev parent reply other threads:[~2007-03-11 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 20:52 Andy Isaacson
2007-03-08 20:53 ` Andy Isaacson
2007-03-11 23:05 ` Neil Brown [this message]
2007-03-09 2:37 ` Bill Davidsen
2007-03-09 6:33 ` Andy Isaacson
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=17908.35664.68737.48529@notabene.brown \
--to=neilb@suse.de \
--cc=adi@hexapodia.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®