linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Michael Morris <Starborn@anime-city.co.uk>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Joshua Kwan <joshk@triplehelix.org>
Subject: Re: 2.6.0-test1-mm2
Date: Sat, 19 Jul 2003 23:12:30 -0700	[thread overview]
Message-ID: <20030719231230.4de39ffe.akpm@osdl.org> (raw)
In-Reply-To: <200307200647.43410.Starborn@anime-city.co.uk>

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");
 		}

_


  reply	other threads:[~2003-07-20  5:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-20  0:43 2.6.0-test1-mm2 Andrew Morton
2003-07-20  2:41 ` 2.6.0-test1-mm2 Joshua Kwan
2003-07-20  4:27   ` 2.6.0-test1-mm2 Andrew Morton
2003-07-20  4:30     ` 2.6.0-test1-mm2 David S. Miller
2003-07-20  4:29   ` 2.6.0-test1-mm2 Joshua Kwan
2003-07-20  5:47     ` 2.6.0-test1-mm2 Michael Morris
2003-07-20  6:12       ` Andrew Morton [this message]
2003-07-20  4:40 ` 2.6.0-test1-mm2 Martin J. Bligh

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=20030719231230.4de39ffe.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Starborn@anime-city.co.uk \
    --cc=joshk@triplehelix.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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).