aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 07d096c49920..81878b78c9d4 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -712,7 +712,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
712 goto out_free_dentry; 712 goto out_free_dentry;
713 713
714 /* OK, This is the point of no return */ 714 /* OK, This is the point of no return */
715 current->flags &= ~PF_FORKNOEXEC;
716 current->mm->def_flags = def_flags; 715 current->mm->def_flags = def_flags;
717 716
718 /* Do this immediately, since STACK_TOP as used in setup_arg_pages 717 /* Do this immediately, since STACK_TOP as used in setup_arg_pages
@@ -934,7 +933,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
934#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */ 933#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
935 934
936 install_exec_creds(bprm); 935 install_exec_creds(bprm);
937 current->flags &= ~PF_FORKNOEXEC;
938 retval = create_elf_tables(bprm, &loc->elf_ex, 936 retval = create_elf_tables(bprm, &loc->elf_ex,
939 load_addr, interp_load_addr); 937 load_addr, interp_load_addr);
940 if (retval < 0) { 938 if (retval < 0) {
@@ -2077,7 +2075,8 @@ out:
2077 2075
2078static int __init init_elf_binfmt(void) 2076static int __init init_elf_binfmt(void)
2079{ 2077{
2080 return register_binfmt(&elf_format); 2078 register_binfmt(&elf_format);
2079 return 0;
2081} 2080}
2082 2081
2083static void __exit exit_elf_binfmt(void) 2082static void __exit exit_elf_binfmt(void)