exec: Set the point of no return sooner
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 4 Apr 2020 17:01:37 +0000 (12:01 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 11 May 2020 17:08:49 +0000 (12:08 -0500)
commit6834e0bb41bbe144d42b8cd843f3ee30bfe2c825
tree5b6a67f79400fd6868e5debdc16dfa1811f40225
parent8890b29341f30f4a364b2eb6046bb1ac1478f955
exec: Set the point of no return sooner

Make the code more robust by marking the point of no return sooner.
This ensures that future code changes don't need to worry about how
they return errors if they are past this point.

This results in no actual change in behavior as __do_execve_file does
not force SIGSEGV when there is a pending fatal signal pending past
the point of no return.  Further the only error returns from de_thread
and exec_mmap that can occur result in fatal signals being pending.

Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/87sgga5klu.fsf_-_@x220.int.ebiederm.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/exec.c