From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Theodore Ts'o <tytso@mit.edu>, Marti Raudsepp <marti@juffo.org>
Cc: Kernel hackers <linux-kernel@vger.kernel.org>,
ext4 hackers <linux-ext4@vger.kernel.org>,
maze@google.com
Subject: Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1
Date: Mon, 17 Sep 2012 16:21:44 +0400 [thread overview]
Message-ID: <87fw6get5z.fsf@openvz.org> (raw)
In-Reply-To: <20120816024654.GB3781@thunk.org>
On Wed, 15 Aug 2012 22:46:54 -0400, Theodore Ts'o <tytso@mit.edu> wrote:
> On Wed, Aug 15, 2012 at 09:33:29PM +0300, Marti Raudsepp wrote:
> > I was moving and deleting some files between two of my ext4 partitions
> > when it suddenly crashed and dropped me into an kernel oops screen
> > (below). I'm using ext4 on kernel 3.5.1 (Arch Linux).
Ohh, I've missed that gigantic topic, but still i've found the bug.
patch is available here http://patchwork.ozlabs.org/patch/183649/
>
> > BUG: unable to handle kernel NULL pointer dereference at 000...00028
> > IP: [...] ext4_ext_remove_space+0xaa4/0xef0 [ext4]
>
> Someone else has reported a similar crash, but we don't yet have
> enough information to narrow it down quite yet.
>
> If you could try applying the following debugging patch, and then try
> to reproduce the failure, it would be really helpful.
>
> Thanks!!
>
> - Ted
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 769151d..3394d52 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -2432,6 +2432,10 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
>
> /* the header must be checked already in ext4_ext_remove_space() */
> ext_debug("truncate since %u in leaf to %u\n", start, end);
> + if (!path[depth].p_hdr && !path[depth].p_bh) {
> + EXT4_ERROR_INODE(inode, "depth %d", depth);
> + BUG_ON(1);
> + }
> if (!path[depth].p_hdr)
> path[depth].p_hdr = ext_block_hdr(path[depth].p_bh);
> eh = path[depth].p_hdr;
> @@ -2730,6 +2734,10 @@ cont:
> /* this is index block */
> if (!path[i].p_hdr) {
> ext_debug("initialize header\n");
> + if (!path[i].p_hdr && !path[i].p_bh) {
> + EXT4_ERROR_INODE(inode, "i=%d", i);
> + BUG_ON(1);
> + }
> path[i].p_hdr = ext_block_hdr(path[i].p_bh);
> }
>
> --
> 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:[~2012-09-17 12:21 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 18:33 NULL pointer dereference in ext4_ext_remove_space on 3.5.1 Marti Raudsepp
2012-08-16 2:46 ` Theodore Ts'o
2012-08-16 11:10 ` Fengguang Wu
2012-08-16 15:25 ` Theodore Ts'o
2012-08-16 20:21 ` Maciej Żenczykowski
2012-08-16 21:19 ` Theodore Ts'o
2012-08-16 21:40 ` Maciej Żenczykowski
2012-08-16 22:26 ` Theodore Ts'o
2012-08-16 22:44 ` Maciej Żenczykowski
2012-08-17 6:01 ` Fengguang Wu
2012-08-17 13:15 ` Theodore Ts'o
2012-08-17 13:22 ` Fengguang Wu
2012-08-17 13:50 ` [PATCH] ext4: fix kernel BUG on large-scale rm -rf commands Theodore Ts'o
2012-08-17 17:48 ` NULL pointer dereference in ext4_ext_remove_space on 3.5.1 Christoph Hellwig
2012-08-17 20:34 ` Theodore Ts'o
2012-08-17 21:05 ` Christoph Hellwig
2012-08-17 22:55 ` Dave Chinner
2012-08-17 23:11 ` Theodore Ts'o
2012-08-17 6:09 ` ext4 write performance regression in 3.6-rc1 Fengguang Wu
2012-08-17 13:40 ` Theodore Ts'o
2012-08-17 14:13 ` Fengguang Wu
2012-08-17 14:25 ` ext4 write performance regression in 3.6-rc1 on RAID0/5 Fengguang Wu
[not found] ` <20120817151318.GA2341@localhost>
2012-08-17 15:37 ` Theodore Ts'o
2012-08-17 20:44 ` NeilBrown
2012-08-21 9:42 ` Fengguang Wu
2012-08-21 12:07 ` Fengguang Wu
[not found] ` <20120822035702.GF2570@yliu-dev.sh.intel.com>
2012-08-22 4:07 ` Shaohua Li
2012-08-22 6:00 ` NeilBrown
2012-08-22 6:31 ` Yuanhan Liu
2012-08-22 7:14 ` Andreas Dilger
2012-08-22 20:47 ` Dan Williams
2012-08-22 21:59 ` NeilBrown
2012-09-17 12:21 ` Dmitry Monakhov [this message]
2012-09-17 13:52 ` NULL pointer dereference in ext4_ext_remove_space on 3.5.1 Theodore Ts'o
2012-09-17 14:48 ` Dmitry Monakhov
2012-08-16 9:00 ` Fengguang Wu
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=87fw6get5z.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marti@juffo.org \
--cc=maze@google.com \
--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).