From: Yongqiang Yang <xiaoqiangnk@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Allison Henderson <achender@linux.vnet.ibm.com>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/1] Null Pointer when make_indexed_dir returns -ENOSPC
Date: Mon, 9 May 2011 19:18:37 +0800 [thread overview]
Message-ID: <BANLkTi=hSeN4mb8x9vu4DfBb-us_ocaqXw@mail.gmail.com> (raw)
In-Reply-To: <20110509110329.GF4122@quack.suse.cz>
On Mon, May 9, 2011 at 7:03 PM, Jan Kara <jack@suse.cz> wrote:
> On Sat 07-05-11 16:54:27, Allison Henderson wrote:
>> Fix for a null pointer bug found while running punch hole tests
>>
>> Signed-off-by: Allison Henderson <achender@us.ibm.com>
>> ---
>> :100644 100644 3c7a06e... 3302a6c... M fs/ext4/namei.c
>> fs/ext4/namei.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
>> index 3c7a06e..3302a6c 100644
>> --- a/fs/ext4/namei.c
>> +++ b/fs/ext4/namei.c
>> @@ -1422,7 +1422,8 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
>> */
>> ext4_mark_inode_dirty(handle, dir);
>> ext4_handle_dirty_metadata(handle, dir, frame->bh);
>> - ext4_handle_dirty_metadata(handle, dir, bh);
>> + if (bh)
>> + ext4_handle_dirty_metadata(handle, dir, bh);
> I'm puzzled - bh here is bh2 from the beginning of the function and we
> check it for being NULL after we ext4_append() it. So how can this happen?
do_split() encounters a journal error and set bh to NULL before returning.
>
> Honza
>> dx_release(frames);
>> return retval;
>> }
>> --
>> 1.7.1
>>
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
> --
> 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
>
--
Best Wishes
Yongqiang Yang
--
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-05-09 11:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 23:54 [PATCH 1/1] Null Pointer when make_indexed_dir returns -ENOSPC Allison Henderson
2011-05-09 0:38 ` Ted Ts'o
2011-05-09 11:03 ` Jan Kara
2011-05-09 11:18 ` Yongqiang Yang [this message]
2011-05-09 11:20 ` Yongqiang Yang
2011-05-09 11:21 ` Yongqiang Yang
2011-05-09 11:30 ` Jan Kara
2011-05-09 11:33 ` Yongqiang Yang
2011-05-09 11:36 ` Jan Kara
2011-05-09 13:55 ` Ted Ts'o
2011-05-09 14:05 ` Jan Kara
2011-05-09 14:22 ` Ted Ts'o
2011-05-09 14:27 ` [PATCH -v2] ext4: don't dereference null pointer when make_indexed_dir() fails Theodore Ts'o
2011-05-09 14:56 ` Eric Sandeen
2011-05-09 14:42 ` [PATCH 1/1] Null Pointer when make_indexed_dir returns -ENOSPC Jan Kara
2011-05-09 20:39 ` Allison Henderson
2011-05-10 13:34 ` Jan Kara
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='BANLkTi=hSeN4mb8x9vu4DfBb-us_ocaqXw@mail.gmail.com' \
--to=xiaoqiangnk@gmail.com \
--cc=achender@linux.vnet.ibm.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
/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).