summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2006-01-03 12:51:07 +0000
committerAnton Altaparmakov <aia21@cantab.net>2006-01-03 12:51:07 +0000
commitd087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (patch)
treec2db1b4958bbf617a25398b7ef93d82006b26a17 /kernel/futex.c
parent292d4ed32e35df4755052b5002e533348d1648fd (diff)
parent88026842b0a760145aa71d69e74fbc9ec118ca44 (diff)
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 5872e3507f3..5e71a6bf6f6 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;
}