]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
futex: Replace PF_EXITPIDONE with a state
authorThomas Gleixner <tglx@linutronix.de>
Wed, 6 Nov 2019 21:55:37 +0000 (22:55 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:47 +0000 (14:21 -0300)
commit37ad901716afcfa61893e11a9a70a5964fd864ac
tree50030cdb52d1262aa6fc123cbfbc3f119649e9b8
parente891c8f7feb9ce822ff7a45205b679c31e7aba51
futex: Replace PF_EXITPIDONE with a state

BugLink: https://bugs.launchpad.net/bugs/1855787
commit 3d4775df0a89240f671861c6ab6e8d59af8e9e41 upstream.

The futex exit handling relies on PF_ flags. That's suboptimal as it
requires a smp_mb() and an ugly lock/unlock of the exiting tasks pi_lock in
the middle of do_exit() to enforce the observability of PF_EXITING in the
futex code.

Add a futex_state member to task_struct and convert the PF_EXITPIDONE logic
over to the new state. The PF_EXITING dependency will be cleaned up in a
later step.

This prepares for handling various futex exit issues later.

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.149449274@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/futex.h
include/linux/sched.h
kernel/exit.c
kernel/futex.c