exec: Move the call of prepare_binprm into search_binary_handler
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 14 May 2020 03:25:20 +0000 (22:25 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 21 May 2020 15:16:57 +0000 (10:16 -0500)
commit8b72ca9004ed35104deb80b07990da5503bc5252
tree302fcaec6e95e41a23ca31981e693dbcfd58af3f
parenta16b3357b2b8e910bb614254d8a7e84d2bd59b4c
exec: Move the call of prepare_binprm into search_binary_handler

The code in prepare_binary_handler needs to be run every time
search_binary_handler is called so move the call into search_binary_handler
itself to make the code simpler and easier to understand.

Link: https://lkml.kernel.org/r/87d070zrvx.fsf_-_@x220.int.ebiederm.org
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/alpha/kernel/binfmt_loader.c
fs/binfmt_em86.c
fs/binfmt_misc.c
fs/binfmt_script.c
fs/exec.c
include/linux/binfmts.h