lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: 2.6.15-git7 oopses in ext3 during LTP runs
From
Date
> 15/fs/ext3/super.c~	2006-01-11 21:54:13.000000000 +0100
> > +++ linux-2.6.15/fs/ext3/super.c 2006-01-11 21:54:13.000000000 +0100
> > @@ -2150,7 +2150,7 @@
> >
> > static void ext3_write_super (struct super_block * sb)
> > {
> > - if (mutex_trylock(&sb->s_lock) != 0)
> > + if (!mutex_trylock(&sb->s_lock) != 0)
> > BUG();
> > sb->s_dirt = 0;
> > }
>
> We expect the lock to be held on entry. Hence we expect mutex_trylock()
> to return zero.

you are correct, and the x86-64 mutex.h is buggy

--- linux-2.6.15/include/asm-x86_64/mutex.h.org 2006-01-11 22:25:37.000000000 +0100
+++ linux-2.6.15/include/asm-x86_64/mutex.h 2006-01-11 22:25:43.000000000 +0100
@@ -104,7 +104,7 @@
static inline int
__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
{
- if (likely(atomic_cmpxchg(count, 1, 0)) == 1)
+ if (likely(atomic_cmpxchg(count, 1, 0) == 1))
return 1;
else
return 0;
changes the asm to be the correct one for me.
This is odd/evil though..



-
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/

\
 
 \ /
  Last update: 2006-01-11 22:30    [W:0.080 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site