public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@redhat.com>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Josef Bacik <jbacik@redhat.com>,
	Josef Bacik <josef@toxicpanda.com>,
	linux-ext4@vger.kernel.org, sct@redhat.com,
	akpm@linux-foundation.org, adilger@sun.com,
	Johannes Weiner <hannes@saeurebad.de>,
	linux-kernel@vger.kernel.org
Subject: Re: ext3 on latest -git: BUG: unable to handle kernel NULL pointer dereference at 0000000c
Date: Thu, 17 Jul 2008 10:13:33 -0400	[thread overview]
Message-ID: <20080717141333.GC14133@unused.rdu.redhat.com> (raw)
In-Reply-To: <19f34abd0807170725p13e81e3dq4daad32ad2a83931@mail.gmail.com>

On Thu, Jul 17, 2008 at 04:25:49PM +0200, Vegard Nossum wrote:
> On Thu, Jul 17, 2008 at 3:57 PM, Josef Bacik <jbacik@redhat.com> wrote:
> > Can you try this patch out and see if it fixes the problem?  I didn't compile
> > test it, so you may need to tweak somethings, but it should work.  Thanks,
> >
> > Signed-off-by: Josef Bacik <jbacik@redhat.com>
> 
> Nope, seems to be the same problem:
> 
> kjournald starting.  Commit interval 5 seconds
> EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
> EXT3 FS on loop0, internal journal
> EXT3-fs: mounted filesystem with ordered data mode.
> EXT3-fs error (device loop0): ext3_free_blocks: Freeing blocks in
> system zones - Block = 16, count = 1
> EXT3-fs error (device loop0): ext3_free_blocks: Freeing blocks in
> system zones - Block = 32, count = 1
> EXT3-fs error (device loop0): ext3_free_blocks: Freeing blocks not in
> datazone - block = 262144, count = 1
> BUG: unable to handle kernel NULL pointer dereference at 0000000c
> IP: [<c01fd210>] journal_dirty_metadata+0xa0/0x160
> 
> Full log at http://folk.uio.no/vegardno/linux/log-1216304953.txt
> 
>

Ok, this should do it then.  Thanks,

Josef

 
Index: linux-2.6/fs/ext3/inode.c
===================================================================
--- linux-2.6.orig/fs/ext3/inode.c
+++ linux-2.6/fs/ext3/inode.c
@@ -2023,13 +2023,27 @@ static void ext3_clear_blocks(handle_t *
 		unsigned long count, __le32 *first, __le32 *last)
 {
 	__le32 *p;
+	int ret;
+
 	if (try_to_extend_transaction(handle, inode)) {
 		if (bh) {
 			BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
-			ext3_journal_dirty_metadata(handle, bh);
+			ret = ext3_journal_dirty_metadata(handle, bh);
+			if (ret) {
+				ext3_std_error(inode->i_sb, ret);
+				return;
+			}
 		}
-		ext3_mark_inode_dirty(handle, inode);
-		ext3_journal_test_restart(handle, inode);
+		ret = ext3_mark_inode_dirty(handle, inode);
+		if (ret)
+			return;
+
+		ret = ext3_journal_test_restart(handle, inode);
+		if (ret) {
+			ext3_std_error(inode->i_sb, ret);
+			return;
+		}
+
 		if (bh) {
 			BUFFER_TRACE(bh, "retaking write access");
 			ext3_journal_get_write_access(handle, bh);
Index: linux-2.6/fs/ext3/balloc.c
===================================================================
--- linux-2.6.orig/fs/ext3/balloc.c
+++ linux-2.6/fs/ext3/balloc.c
@@ -498,6 +498,7 @@ void ext3_free_blocks_sb(handle_t *handl
 		ext3_error (sb, "ext3_free_blocks",
 			    "Freeing blocks not in datazone - "
 			    "block = "E3FSBLK", count = %lu", block, count);
+		err = -EIO;
 		goto error_return;
 	}
 
@@ -535,6 +536,7 @@ do_more:
 			    "Freeing blocks in system zones - "
 			    "Block = "E3FSBLK", count = %lu",
 			    block, count);
+		err = -EIO;
 		goto error_return;
 	}
 

  reply	other threads:[~2008-07-17 14:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 12:51 ext3 on latest -git: BUG: unable to handle kernel NULL pointer dereference at 0000000c Vegard Nossum
2008-07-17 13:13 ` Josef Bacik
2008-07-17 13:20   ` Vegard Nossum
2008-07-17 13:34     ` Josef Bacik
2008-07-17 13:39       ` Vegard Nossum
2008-07-17 13:40         ` Josef Bacik
2008-07-17 13:57         ` Josef Bacik
2008-07-17 14:25           ` Vegard Nossum
2008-07-17 14:13             ` Josef Bacik [this message]
2008-07-17 14:35               ` Vegard Nossum
2008-07-17 14:16                 ` Josef Bacik
2008-07-17 14:44                   ` Vegard Nossum
2008-07-17 14:33                     ` Josef Bacik
2008-07-17 15:00                       ` Vegard Nossum
2008-07-17 14:43                         ` Josef Bacik
2008-07-17 23:09                           ` Andreas Dilger
2008-07-18 10:51                             ` Josef Bacik
2008-07-18 11:32                               ` Vegard Nossum
2008-07-18 11:20                                 ` Josef Bacik
2008-07-18 11:58                                   ` Vegard Nossum
2008-07-18 20:28                                     ` Vegard Nossum
2008-07-17 15:08                     ` Theodore Tso
2008-07-17 15:16                       ` Vegard Nossum
2008-07-17 15:40                         ` Theodore Tso
2008-07-17 23:06                           ` Andreas Dilger

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=20080717141333.GC14133@unused.rdu.redhat.com \
    --to=jbacik@redhat.com \
    --cc=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@saeurebad.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    --cc=vegard.nossum@gmail.com \
    /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