From: Xi Wang <xi.wang@gmail.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Haogang Chen <haogangchen@gmail.com>,
Theodore Tso <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Yongqiang Yang <xiaoqiangnk@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] FS: ext4: fix integer overflow in alloc_flex_gd()
Date: Tue, 21 Feb 2012 08:55:57 -0500 [thread overview]
Message-ID: <0E72E3B2-DAA7-45F4-845D-AF4E76174A33@gmail.com> (raw)
In-Reply-To: <4F42DBA0.4090502@redhat.com>
On Feb 20, 2012, at 6:47 PM, Eric Sandeen wrote:
> Hm this raises a few questions I think.
>
> On the one hand, making sure the kmalloc arg doesn't overflow here is
> certainly a good thing and probably the right thing to do in the short term.
>
> So I guess:
>
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
>
> for that, to close the hole.
Another possibility is to wait for knalloc/kmalloc_array in the -mm
tree, which is basically the non-zeroing version of kcalloc that
performs overflow checking.
> Doesn't this also mean that a valid s_log_groups_per_flex (i.e. 31)
> will fail in this resize code? That would be an unexpected outcome.
> 2^31 groups per flex is a little crazy, but still technically valid
> according to the limits in the code.
Or we could limit s_log_groups_per_flex/groups_per_flex to a
reasonable upper bound in ext4_fill_flex_info(), right?
- xi
next prev parent reply other threads:[~2012-02-21 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 22:41 Haogang Chen
2012-02-20 23:47 ` Eric Sandeen
2012-02-21 13:55 ` Xi Wang [this message]
2012-02-21 16:36 ` Eric Sandeen
2012-02-21 17:19 ` Andreas Dilger
2012-05-28 18:24 ` 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=0E72E3B2-DAA7-45F4-845D-AF4E76174A33@gmail.com \
--to=xi.wang@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=haogangchen@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
--cc=xiaoqiangnk@gmail.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
all inboxes | Powered by JetHome®