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>
Fri, 29 Nov 2019 09:10:12 +0000 (10:10 +0100)
commit398902dbc8464d4e1bdf77bf1e4716a283ff5562
treec0310c71094d402d9d8f747f82dd5ab621f37631
parentb2f4e10676f7c1ae38a881afa265585365730c81
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