futex: Sanitize exit state handling
authorThomas Gleixner <tglx@linutronix.de>
Wed, 6 Nov 2019 21:55:42 +0000 (22:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:38:27 +0000 (15:38 +0100)
commit0633e316e2a8bbea17949ae85c9cebf3a67eeaa1
tree844552eb84e484702e4b7b69f4ac7e93d3f9f617
parent1be36de0acdc5d58d8e2510b8b35c6d97c881451
futex: Sanitize exit state handling

commit 4a8e991b91aca9e20705d434677ac013974e0e30 upstream.

Instead of having a smp_mb() and an empty lock/unlock of task::pi_lock move
the state setting into to the lock section.

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.645603214@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/futex.c