linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.0-test2: resiserfs BUG on Alt-SysRq-U
@ 2003-08-04 16:56 Andrey Borzenkov
  2003-08-05  8:28 ` Oleg Drokin
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2003-08-04 16:56 UTC (permalink / raw)
  To: linux-kernel


this has been around since 2.5.75 at least and may be before it as well.

-andrey

sh-2.05b# SysRq : Emergency Remount R/O
------------[ cut here ]------------
kernel BUG at fs/reiserfs/journal.c:409!
invalid operand: 0000 [#1]
CPU:    0
EIP:    0060:[<d187081a>]    Not tainted
EFLAGS: 00010246
EIP is at reiserfs_check_lock_depth+0x2a/0x40 [reiserfs]
eax: 00000000   ebx: cf369004   ecx: 00000000   edx: ffffcc00
esi: cf369004   edi: cf721f78   ebp: cf721eb4   esp: cf721eac
ds: 007b   es: 007b   ss: 0068
Process pdflush (pid: 7, threadinfo=cf720000 task=cf749000)
Stack: d187bae0 d187ecb3 cf721ef0 d187375e d187ecb3 3f2e87df 00000000 00000000
       d187e847 00000077 00000000 00000000 00000000 00000000 cf369004 cf28d000
       cf721f78 cf721f08 d1873a46 cf721f24 cf369004 0000000a 00000000 cf721f50
Call Trace:
 [<d187375e>] do_journal_begin_r+0x1e/0x2d0 [reiserfs]
 [<d1873a46>] journal_begin+0x16/0x20 [reiserfs]
 [<d1864310>] reiserfs_remount+0xb0/0x1d0 [reiserfs]
 [<c01662fe>] sync_blockdev+0x2e/0x40
 [<c016c4ec>] do_remount_sb+0xac/0x110
 [<c016c6b6>] do_emergency_remount+0x166/0x1b0
 [<c01494fe>] __pdflush+0x16e/0x390
 [<c011f37f>] schedule_tail+0xbf/0xe0
 [<c0149720>] pdflush+0x0/0x20
 [<c014972f>] pdflush+0xf/0x20
 [<c016c550>] do_emergency_remount+0x0/0x1b0
 [<c0109029>] kernel_thread_helper+0x5/0xc

Code: 0f 0b 99 01 d9 eb 87 d1 58 5a eb dd 8d 76 00 8d bc 27 00 00



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.0-test2: resiserfs BUG on Alt-SysRq-U
  2003-08-04 16:56 2.6.0-test2: resiserfs BUG on Alt-SysRq-U Andrey Borzenkov
@ 2003-08-05  8:28 ` Oleg Drokin
  2003-08-05 18:00   ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Drokin @ 2003-08-05  8:28 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: linux-kernel

Hello!

On Mon, Aug 04, 2003 at 08:56:15PM +0400, Andrey Borzenkov wrote:

> this has been around since 2.5.75 at least and may be before it as well.
> kernel BUG at fs/reiserfs/journal.c:409!

Hm, indeed.
So they are calling ->remount() without lock_kernel these days.
The patch below should help, please verify.

Thank you.

Bye,
    Oleg
===== fs/reiserfs/super.c 1.66 vs edited =====
--- 1.66/fs/reiserfs/super.c	Sat Jun 21 00:16:06 2003
+++ edited/fs/reiserfs/super.c	Tue Aug  5 12:22:10 2003
@@ -761,6 +761,7 @@
   if (!reiserfs_parse_options(s, arg, &mount_options, &blocks, NULL))
     return -EINVAL;
   
+  reiserfs_write_lock(s);
   handle_attrs(s);
 
   /* Add options that are safe here */
@@ -778,17 +779,22 @@
 
   if(blocks) {
     int rc = reiserfs_resize(s, blocks);
-    if (rc != 0)
+    if (rc != 0) {
+      reiserfs_write_unlock(s);
       return rc;
+    }
   }
 
   if (*mount_flags & MS_RDONLY) {
     /* remount read-only */
-    if (s->s_flags & MS_RDONLY)
+    if (s->s_flags & MS_RDONLY) {
       /* it is read-only already */
+      reiserfs_write_unlock(s);
       return 0;
+    }
     /* try to remount file system with read-only permissions */
     if (sb_umount_state(rs) == REISERFS_VALID_FS || REISERFS_SB(s)->s_mount_state != REISERFS_VALID_FS) {
+      reiserfs_write_unlock(s);
       return 0;
     }
 
@@ -800,8 +806,10 @@
     s->s_dirt = 0;
   } else {
     /* remount read-write */
-    if (!(s->s_flags & MS_RDONLY))
+    if (!(s->s_flags & MS_RDONLY)) {
+        reiserfs_write_unlock(s);
 	return 0; /* We are read-write already */
+    }
 
     REISERFS_SB(s)->s_mount_state = sb_umount_state(rs) ;
     s->s_flags &= ~MS_RDONLY ; /* now it is safe to call journal_begin */
@@ -824,6 +832,7 @@
   if (!( *mount_flags & MS_RDONLY ) )
     finish_unfinished( s );
 
+  reiserfs_write_unlock(s);
   return 0;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.0-test2: resiserfs BUG on Alt-SysRq-U
  2003-08-05  8:28 ` Oleg Drokin
@ 2003-08-05 18:00   ` Andrey Borzenkov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2003-08-05 18:00 UTC (permalink / raw)
  To: Oleg Drokin; +Cc: linux-kernel

On Tuesday 05 August 2003 12:28, Oleg Drokin wrote:
> Hello!
>
> On Mon, Aug 04, 2003 at 08:56:15PM +0400, Andrey Borzenkov wrote:
> > this has been around since 2.5.75 at least and may be before it as well.
> > kernel BUG at fs/reiserfs/journal.c:409!
>
> Hm, indeed.
> So they are calling ->remount() without lock_kernel these days.
> The patch below should help, please verify.
>

yes, it seems to have fixed it.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-05 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 16:56 2.6.0-test2: resiserfs BUG on Alt-SysRq-U Andrey Borzenkov
2003-08-05  8:28 ` Oleg Drokin
2003-08-05 18:00   ` Andrey Borzenkov

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).