]> git.ipfire.org Git - people/arne_f/kernel.git/commit
exit/exec: Seperate mm_release()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 1 Feb 2021 10:01:35 +0000 (10:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:19:49 +0000 (23:19 +0100)
commit394ff1207f6034f66246551434ccbd3478c928bb
tree50320ccec6edd735175b12159431b939408097f5
parent2c116895783bee44a2b2630b3d7207d124dbac32
exit/exec: Seperate mm_release()

commit 4610ba7ad877fafc0a25a30c6c82015304120426 upstream.

mm_release() contains the futex exit handling. mm_release() is called from
do_exit()->exit_mm() and from exec()->exec_mm().

In the exit_mm() case PF_EXITING and the futex state is updated. In the
exec_mm() case these states are not touched.

As the futex exit code needs further protections against exit races, this
needs to be split into two functions.

Preparatory only, no functional change.

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.240518241@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exec.c
include/linux/sched.h
kernel/exit.c
kernel/fork.c