From: Roel Kluin <roel.kluin@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>,
linux-ext4@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: ext4: buffer underrun in ext4_ext_split()?
Date: Fri, 07 Aug 2009 20:19:49 +0200 [thread overview]
Message-ID: <4A7C7045.7040704@gmail.com> (raw)
If `depth' is less or equal to `at', a buffer underrun occurs
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
I am not sure whether this is possible.
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index afea652..25bc182 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -822,7 +822,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
}
/* initialize new leaf */
- newblock = ablocks[--a];
+ newblock = a ? ablocks[--a] : 0;
BUG_ON(newblock == 0);
bh = sb_getblk(inode->i_sb, newblock);
if (!bh) {
next reply other threads:[~2009-08-07 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 18:19 Roel Kluin [this message]
2009-08-07 18:50 ` ext4: buffer underrun in ext4_ext_split()? Roel Kluin
2009-08-08 3:32 ` Theodore Tso
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=4A7C7045.7040704@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.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 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).