lkml.org 
[lkml]   [2006]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bug in futex unqueue_me

* Christian Borntraeger <borntrae@de.ibm.com> wrote:

> On Sunday 30 July 2006 08:38, Ingo Molnar wrote:
> > interesting, how is this possible? We do a spin_lock(lock_ptr), and
> > taking a spinlock is an implicit barrier(). So gcc must not delay
> > evaluating lock_ptr to inside the critical section. And as far as i can
> > see the s390 spinlock implementation goes through an 'asm volatile'
> > piece of code, which is a barrier already. So how could this have
> > happened?
>
> spin_lock is a barrier, but isnt the barrierness too late here? The
> compiler reloads the value of lock_ptr after the "if(lock_ptr)" and
> *before* calling spin_lock(lock_ptr):

ah, indeed. So your patch is a real fix. Thanks,

Acked-by: Ingo Molnar <mingo@elte.hu>

Ingo
-
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-07-31 13:59    [from the cache]
©2003-2011 Jasper Spaans