summaryrefslogtreecommitdiff
path: root/fs/binfmt_script.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2020-05-13 22:25:20 -0500
committerEric W. Biederman <ebiederm@xmission.com>2020-05-21 10:16:57 -0500
commit8b72ca9004ed35104deb80b07990da5503bc5252 (patch)
tree302fcaec6e95e41a23ca31981e693dbcfd58af3f /fs/binfmt_script.c
parenta16b3357b2b8e910bb614254d8a7e84d2bd59b4c (diff)
downloadlinux-starfive-8b72ca9004ed35104deb80b07990da5503bc5252.tar.gz
linux-starfive-8b72ca9004ed35104deb80b07990da5503bc5252.tar.bz2
linux-starfive-8b72ca9004ed35104deb80b07990da5503bc5252.zip
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>
Diffstat (limited to 'fs/binfmt_script.c')
-rw-r--r--fs/binfmt_script.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
index e9e6a6f4a35f..8d718d8fd0fe 100644
--- a/fs/binfmt_script.c
+++ b/fs/binfmt_script.c
@@ -143,9 +143,6 @@ static int load_script(struct linux_binprm *bprm)
return PTR_ERR(file);
bprm->file = file;
- retval = prepare_binprm(bprm);
- if (retval < 0)
- return retval;
return search_binary_handler(bprm);
}