Re: 2.6.0-test1-mm2

From: Andrew Morton (akpm@osdl.org)
Date: Sun Jul 20 2003 - 01:12:30 EST


Michael Morris <Starborn@anime-city.co.uk> wrote:
>
> Here's my oops:
>
> Unable to handle kernel NULL pointer dereference at virtual address 00000014
> EIP is at journal_dirty_metadata+0x38/0x210

OK, bad bug. This should fix it.

 fs/ext3/inode.c | 16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff -puN fs/ext3/inode.c~ext3_getblk-race-fix-fix fs/ext3/inode.c
--- 25/fs/ext3/inode.c~ext3_getblk-race-fix-fix 2003-07-19 22:59:50.000000000 -0700
+++ 25-akpm/fs/ext3/inode.c 2003-07-19 23:07:42.000000000 -0700
@@ -936,19 +936,17 @@ struct buffer_head *ext3_getblk(handle_t
                            ext3_get_block instead, so it's not a
                            problem. */
                         lock_buffer(bh);
- if (!buffer_uptodate(bh)) {
- BUFFER_TRACE(bh, "call get_create_access");
- fatal = ext3_journal_get_create_access(handle, bh);
- if (!fatal) {
- memset(bh->b_data, 0,
- inode->i_sb->s_blocksize);
- set_buffer_uptodate(bh);
- }
+ BUFFER_TRACE(bh, "call get_create_access");
+ fatal = ext3_journal_get_create_access(handle, bh);
+ if (!fatal && !buffer_uptodate(bh)) {
+ memset(bh->b_data, 0, inode->i_sb->s_blocksize);
+ set_buffer_uptodate(bh);
                         }
                         unlock_buffer(bh);
                         BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
                         err = ext3_journal_dirty_metadata(handle, bh);
- if (!fatal) fatal = err;
+ if (!fatal)
+ fatal = err;
                 } else {
                         BUFFER_TRACE(bh, "not a new buffer");
                 }

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:39 EST