futex: Add mutex around futex exit
authorThomas Gleixner <tglx@linutronix.de>
Wed, 6 Nov 2019 21:55:44 +0000 (22:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:10:13 +0000 (10:10 +0100)
commitd3ba1e8d5c7dddcd36415e9f341274967f073794
treee32e13f5f2dda0abf5b86c72bc041eaec8c30f77
parent172b09ddc38d1b77b502df3ff7d5c925595b6026
futex: Add mutex around futex exit

commit 3f186d974826847a07bc7964d79ec4eded475ad9 upstream.

The mutex will be used in subsequent changes to replace the busy looping of
a waiter when the futex owner is currently executing the exit cleanup to
prevent a potential live lock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20191106224556.845798895@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/futex.h
include/linux/sched.h
kernel/futex.c