author: Eric W. Biederman <ebiederm@xmission.com> 2020-05-18 18:43:20 -0500
committer: Eric W. Biederman <ebiederm@xmission.com> 2020-05-21 10:16:57 -0500
commit: bc2bf338d54b7aadaed49bb45b9e10d4592b2a46
parent: b8a61c9e7b4a0fec493d191429e9653d66a79ccc
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 7 deletions
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
index 85e0ef86eb11..0e8b953d12cf 100644
--- a/fs/binfmt_script.c
+++ b/fs/binfmt_script.c
@@ -93,11 +93,6 @@ static int load_script(struct linux_binprm *bprm)
if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE)
return -ENOENT;
- /* Release since we are not mapping a binary into memory. */
- allow_write_access(bprm->file);
- fput(bprm->file);
- bprm->file = NULL;
-
/*
* OK, we've parsed out the interpreter name and
* (optional) argument.
@@ -138,8 +133,8 @@ static int load_script(struct linux_binprm *bprm)
if (IS_ERR(file))
return PTR_ERR(file);
- bprm->file = file;
- return search_binary_handler(bprm);
+ bprm->interpreter = file;
+ return 0;
}
static struct linux_binfmt script_format = {