> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]