diff --git a/[refs] b/[refs] index ddeb1a0be42a..536e339da863 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6003a93e7bf6c02f33c02976ff364785d4273295 +refs/heads/master: 8e31108b9f41069d55cb9b019ac8262c55fd2616 diff --git a/trunk/kernel/futex.c b/trunk/kernel/futex.c index 5872e3507f35..5e71a6bf6f6b 100644 --- a/trunk/kernel/futex.c +++ b/trunk/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; }