Since the futex_q can dissapear the instruction after assigning NULL,
this really should be a RELEASE barrier. That stops loads from hitting
dead memory too.
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
kernel/futex.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -1288,8 +1288,7 @@ static void mark_wake_futex(struct wake_
* memory barrier is required here to prevent the following
* store to lock_ptr from getting ahead of the plist_del.
- q->lock_ptr = NULL;
+ smp_store_release(&q->lock_ptr, NULL);