All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Viro <viro@math.psu.edu>
To: svbj@online.no
Cc: linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@transmeta.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: BUG?: 2.4.5 breaks reiserfs (kernel BUG)
Date: Sun, 27 May 2001 18:22:23 -0400 (EDT)	[thread overview]
Message-ID: <Pine.GSO.4.21.0105271813320.3848-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <3B113742.518984CD@bjerkeset.com>



On Sun, 27 May 2001, Bjerkeset, Svein Olav wrote:

> Hi,
> 
> Today I downloaded kernel 2.4.5 and compiled it. The kernel worked fine
> until
> I tried to halt the computer. When trying to unmount the reiserfs
> filesystems,
> the system freezes with the following output:
> 
> journal_begin called without kernel lock held
> kernel BUG at journal.c:423!

	Yes. My fault - badly merged patch in -pre6, actually.
Details:
	* kill_super() gets called without BKL, but doesn't grab BKL around
the calls of ->write_super() and ->put_super()
	* by the time when it calls these methods filesystem is quiet. I.e.
nothing else has a chance to touch its data structures. So actually only
reiserfs (which checks that we hold BKL) had noticed.
	* It _is_ a bug - changing locking rules is for 2.5.

Fix:
--- fs/super.c	Fri May 25 21:51:14 2001
+++ fs/super.c	Sun May 27 00:21:53 2001
@@ -873,6 +873,7 @@
 	}
 	spin_unlock(&dcache_lock);
 	down_write(&sb->s_umount);
+	lock_kernel();
 	sb->s_root = NULL;
 	/* Need to clean after the sucker */
 	if (fs->fs_flags & FS_LITTER)
@@ -901,6 +902,7 @@
 	put_filesystem(fs);
 	sb->s_type = NULL;
 	unlock_super(sb);
+	unlock_kernel();
 	up_write(&sb->s_umount);
 	if (bdev) {
 		blkdev_put(bdev, BDEV_FS);


      reply	other threads:[~2001-05-27 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-27 17:20 BUG?: 2.4.5 breaks reiserfs (kernel BUG) Bjerkeset, Svein Olav
2001-05-27 22:22 ` Alexander Viro [this message]

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=Pine.GSO.4.21.0105271813320.3848-100000@weyl.math.psu.edu \
    --to=viro@math.psu.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=svbj@online.no \
    --cc=torvalds@transmeta.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.