All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward@namesys.com>
To: Adam Nielsen <a.nielsen@shikadi.net>
Cc: reiserfs-list@namesys.com, Hans Reiser <reiser@namesys.com>
Subject: Re: Segfault on nonexistent journal device
Date: Mon, 18 Apr 2005 16:56:42 +0400	[thread overview]
Message-ID: <4263AE8A.5070101@namesys.com> (raw)
In-Reply-To: <20050417113856.155b8166.a.nielsen@shikadi.net>

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

Adam Nielsen wrote:

>Hi all,
>
>Further to my previous message, I've found that if you try to mount a reiserfs device and tell it to use a nonexistent log device, you get a segfault and a kernel NULL pointer dereference - in case this hasn't already been fixed in a newer release, this is what I did:
>
>$ mount -t reiserfs /dev/cdrom /mnt/cdrom -o ro,nolog,jdev=t
>Segmentation fault
>
>kernel: ReiserFS: hdc: warning: journal_init_dev: Cannot open 't': -2
>kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
>kernel:  printing eip:
>kernel: c018b5b2
>kernel: *pde = 00000000
>kernel: Oops: 0000 [#1]
>...
>kernel: Call Trace:
>kernel:  [<c01b27b0>] journal_init_dev+0x140/0x1b0
>kernel:  [<c01af2ba>] allocate_bitmap_node+0x3a/0xa0
>kernel:  [<c01af3ce>] allocate_bitmap_nodes+0x1e/0x50
>...
>
>It seems that after this I can no longer mount any reiserfs volumes - time for a restart I think.
>
>Cheers,
>Adam.
>
>
>  
>
The fix against 2.6.11 is attached
Edward.

[-- Attachment #2: journal_init_dev_fix.patch --]
[-- Type: text/x-patch, Size: 453 bytes --]

diff -urN linux-2.6.11.orig/fs/reiserfs/journal.c linux-2.6.11/fs/reiserfs/journal.c
--- linux-2.6.11.orig/fs/reiserfs/journal.c	2005-04-18 13:55:44.000000000 +0400
+++ linux-2.6.11/fs/reiserfs/journal.c	2005-04-18 14:52:25.471889996 +0400
@@ -2323,6 +2323,7 @@
 	}
 	if( result != 0 ) {
 		release_journal_dev( super, journal );
+		return result;
 	}
 	reiserfs_info(super, "journal_init_dev: journal device: %s\n",
 		bdevname(journal->j_dev_bd, b));

  reply	other threads:[~2005-04-18 12:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17  1:38 Segfault on nonexistent journal device Adam Nielsen
2005-04-18 12:56 ` Edward Shishkin [this message]
2005-04-27 13:27 ` searching on groups of files in reiser4 Nicolas Smallwood
2005-04-27 14:24   ` Hans Reiser
2005-04-27 21:57     ` David Masover

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=4263AE8A.5070101@namesys.com \
    --to=edward@namesys.com \
    --cc=a.nielsen@shikadi.net \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.