diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 16:59:55 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 16:59:55 +0100 |
commit | 02f693c7118f6be9e677070eb630c1f3a654cdd3 (patch) | |
tree | b5493c816a1f76a01319a84955c5ba07d47517c3 /kernel/futex.c | |
parent | Merge branch 'upstream' (diff) | |
parent | Merge branch 'master' (diff) | |
download | linux-02f693c7118f6be9e677070eb630c1f3a654cdd3.tar.xz linux-02f693c7118f6be9e677070eb630c1f3a654cdd3.zip |
Merge branch 'upstream'
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 5872e3507f35..5e71a6bf6f6b 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -270,7 +270,13 @@ static void wake_futex(struct futex_q *q) /* * The waiting task can free the futex_q as soon as this is written, * without taking any locks. This must come last. + * + * A memory barrier is required here to prevent the following store + * to lock_ptr from getting ahead of the wakeup. Clearing the lock + * at the end of wake_up_all() does not prevent this store from + * moving. */ + wmb(); q->lock_ptr = NULL; } |