From: Eric Sandeen <sandeen@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ext4: off by one check in ext4_groupinfo_create_slab()
Date: Thu, 10 Feb 2011 00:12:17 +0000 [thread overview]
Message-ID: <4D532D61.7030007@redhat.com> (raw)
In-Reply-To: <20110209232412.GC4384@bicker>
On 2/9/11 5:24 PM, Dan Carpenter wrote:
> If cache_index = NR_GRPINFO_CACHES then we read past the end of the
> ext4_groupinfo_caches[] array a couple lines later.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Argh, you'd think I could cut and paste from jbd2 better :(
Thanks,
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 02cff4a..d1fe09a 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2438,7 +2438,7 @@ static int ext4_groupinfo_create_slab(size_t size)
> int cache_index = blocksize_bits - EXT4_MIN_BLOCK_LOG_SIZE;
> struct kmem_cache *cachep;
>
> - if (cache_index > NR_GRPINFO_CACHES)
> + if (cache_index >= NR_GRPINFO_CACHES)
> return -EINVAL;
>
> if (unlikely(cache_index < 0))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ext4: off by one check in ext4_groupinfo_create_slab()
Date: Wed, 09 Feb 2011 18:12:17 -0600 [thread overview]
Message-ID: <4D532D61.7030007@redhat.com> (raw)
In-Reply-To: <20110209232412.GC4384@bicker>
On 2/9/11 5:24 PM, Dan Carpenter wrote:
> If cache_index == NR_GRPINFO_CACHES then we read past the end of the
> ext4_groupinfo_caches[] array a couple lines later.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Argh, you'd think I could cut and paste from jbd2 better :(
Thanks,
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 02cff4a..d1fe09a 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2438,7 +2438,7 @@ static int ext4_groupinfo_create_slab(size_t size)
> int cache_index = blocksize_bits - EXT4_MIN_BLOCK_LOG_SIZE;
> struct kmem_cache *cachep;
>
> - if (cache_index > NR_GRPINFO_CACHES)
> + if (cache_index >= NR_GRPINFO_CACHES)
> return -EINVAL;
>
> if (unlikely(cache_index < 0))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" 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:[~2011-02-10 0:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 23:24 [patch] ext4: off by one check in ext4_groupinfo_create_slab() Dan Carpenter
2011-02-09 23:24 ` Dan Carpenter
2011-02-10 0:12 ` Eric Sandeen [this message]
2011-02-10 0:12 ` Eric Sandeen
2011-02-11 0:00 ` Ted Ts'o
2011-02-11 0:00 ` Ted Ts'o
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=4D532D61.7030007@redhat.com \
--to=sandeen@redhat.com \
--cc=adilger.kernel@dilger.ca \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.