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>
Thu, 5 Dec 2019 14:38:28 +0000 (15:38 +0100)
commitac7e59a0c1ae35a252b2e9946547b82be90cec36
treec53ef29c464c3682b5c5f383bf4a6968aac413fc
parent7d143b66d4677bacb9ae20490c8ce725ccbd83fb
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