From: Ted Ts'o <tytso@mit.edu>
To: Robin Dong <hao.bigrat@gmail.com>
Cc: linux-ext4@vger.kernel.org, Robin Dong <sanbai@taobao.com>
Subject: Re: [PATCH v3] ext4: avoid eh_entries overflow before insert extent_idx
Date: Sun, 17 Jul 2011 23:46:26 -0400 [thread overview]
Message-ID: <20110718034626.GE14869@thunk.org> (raw)
In-Reply-To: <1309156180-3899-1-git-send-email-sanbai@taobao.com>
On Mon, Jun 27, 2011 at 02:29:40PM +0800, Robin Dong wrote:
> If eh_entries is equal to (or greater than) eh_max, the operation of
> inserting new extent_idx will make number of entries overflow.
> So check eh_entries before inserting the new extent_idx.
>
> Although there is no bug case according the code (function ext4_ext_insert_index
> is called by ext4_ext_split and ext4_ext_split is called only if the index
> block has free space), the right logic should be "lookup the capacity before
> insertion".
>
> Signed-off-by: Robin Dong <sanbai@taobao.com>
Thanks, added to the ext4 tree.
- Ted
prev parent reply other threads:[~2011-07-18 3:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 6:29 [PATCH v3] ext4: avoid eh_entries overflow before insert extent_idx Robin Dong
2011-07-18 3:46 ` Ted Ts'o [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=20110718034626.GE14869@thunk.org \
--to=tytso@mit.edu \
--cc=hao.bigrat@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sanbai@taobao.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;
as well as URLs for NNTP newsgroup(s).