Re: 2.4.5 + ReiserFS + SMP + umount = oops

Ed Tomlinson (tomlins@cam.org)
Sun, 27 May 2001 13:38:00 -0400


Hi,

This was reported on the reiserfs list yesterday. Seems that the cleanup
applied late in 2.4.5-pre affected the locking of the umount process. This
was posted to fix the problem.

Ed Tomlinson

-----------------------

"Vladimir V. Saveliev" wrote:
>
> Hi
>
> Gergely Tamas wrote:
> >
> > Hi!
> >
> > Kernel is 2.4.5
> >
> > I've tried to unmount a reiserfs device (/uu.new) and got a segfault.
>
> Well, sys_umount in 2.4.5 changed to not lock_kernel() at the beginning and to not unlock_kernel() at the end correspondingly.
> journal_begin expectes kernel locked and it oopses when it is not. Maybe reiserfs_put_super should lock_kernel () itself?
>

Hi,

You are right.
It seems, the next patch can fix umount reiserfs bug in linux-2.4.5 :

diff -urN v2.4.5/fs/reiserfs/super.c linux/fs/reiserfs/super.c
--- v2.4.5/fs/reiserfs/super.c Sun Apr 29 16:02:25 2001
+++ linux/fs/reiserfs/super.c Sat May 26 19:10:16 2001
@@ -104,7 +104,8 @@
{
int i;
struct reiserfs_transaction_handle th ;
-
+
+ lock_kernel() ;
/* change file system state to current state if it was mounted with
read-write permissions */
if (!(s->s_flags & MS_RDONLY)) {
journal_begin(&th, s, 10) ;
@@ -117,6 +118,7 @@
** to do a journal_end
*/
journal_release(&th, s) ;
+ unlock_kernel() ;

for (i = 0; i < SB_BMAP_NR (s); i ++)
brelse (SB_AP_BITMAP (s)[i]);

Thanks,
Yura.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/