aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-11-06 22:55:43 +0100
committerThomas Gleixner <tglx@linutronix.de>2019-11-20 09:40:09 +0100
commitaf8cbda2cfcaa5515d61ec500498d46e9a8247e2 (patch)
treed0155e66a8b7ff398e0f817eb3ea8de4775e8a0c /include/linux/sched.h
parentfutex: Sanitize exit state handling (diff)
downloadlinux-dev-af8cbda2cfcaa5515d61ec500498d46e9a8247e2.tar.xz
linux-dev-af8cbda2cfcaa5515d61ec500498d46e9a8247e2.zip
futex: Provide state handling for exec() as well
exec() attempts to handle potentially held futexes gracefully by running the futex exit handling code like exit() does. The current implementation has no protection against concurrent incoming waiters. The reason is that the futex state cannot be set to FUTEX_STATE_DEAD after the cleanup because the task struct is still active and just about to execute the new binary. While its arguably buggy when a task holds a futex over exec(), for consistency sake the state handling can at least cover the actual futex exit cleanup section. This provides state consistency protection accross the cleanup. As the futex state of the task becomes FUTEX_STATE_OK after the cleanup has been finished, this cannot prevent subsequent attempts to attach to the task in case that the cleanup was not successfull in mopping up all leftovers. 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.753355618@linutronix.de
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions