]> Pileus Git - ~andy/linux/commitdiff
take removal of PF_FORKNOEXEC to flush_old_exec()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 24 Feb 2012 03:29:17 +0000 (22:29 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 21 Mar 2012 01:29:51 +0000 (21:29 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/x86/ia32/ia32_aout.c
fs/binfmt_aout.c
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/binfmt_flat.c
fs/binfmt_som.c
fs/exec.c

index cdfc8dc43670274299bf77ddf9c832b405c7e9c0..4c2e59a420b9f64a0f2709aef67188e19f8d3063 100644 (file)
@@ -323,7 +323,6 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        }
 
        install_exec_creds(bprm);
-       current->flags &= ~PF_FORKNOEXEC;
 
        if (N_MAGIC(ex) == OMAGIC) {
                unsigned long text_addr, map_size;
index a543364ba29b5e7194af2172ab9b2b1830093f1d..4d5e6d26578c6da8125891e06e61d8839d460649 100644 (file)
@@ -267,7 +267,6 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        }
 
        install_exec_creds(bprm);
-       current->flags &= ~PF_FORKNOEXEC;
 
        if (N_MAGIC(ex) == OMAGIC) {
                unsigned long text_addr, map_size;
index f8ac4251877e987c2a1150b266f13728bc7ecce5..81878b78c9d4666c2bc7a8d14da15cfbab3037a6 100644 (file)
@@ -712,7 +712,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
                goto out_free_dentry;
 
        /* OK, This is the point of no return */
-       current->flags &= ~PF_FORKNOEXEC;
        current->mm->def_flags = def_flags;
 
        /* 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)
 #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
 
        install_exec_creds(bprm);
-       current->flags &= ~PF_FORKNOEXEC;
        retval = create_elf_tables(bprm, &loc->elf_ex,
                          load_addr, interp_load_addr);
        if (retval < 0) {
index e7afcb67a2d314a7a19bad3d50f4b1e340f78873..c64bf5ee2df480e55c5fe38423b7c1ec88d5a46b 100644 (file)
@@ -335,8 +335,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
        current->mm->context.exec_fdpic_loadmap = 0;
        current->mm->context.interp_fdpic_loadmap = 0;
 
-       current->flags &= ~PF_FORKNOEXEC;
-
 #ifdef CONFIG_MMU
        elf_fdpic_arch_lay_out_mm(&exec_params,
                                  &interp_params,
@@ -414,7 +412,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
 #endif
 
        install_exec_creds(bprm);
-       current->flags &= ~PF_FORKNOEXEC;
        if (create_elf_fdpic_tables(bprm, current->mm,
                                    &exec_params, &interp_params) < 0)
                goto error_kill;
index 68affab8814619d07eae8896d1cdd5c5d2b31f9d..04f61f0bdfdef617862322ce54a9d77226b8f560 100644 (file)
@@ -902,7 +902,6 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                                                libinfo.lib_list[j].start_data:UNLOADED_LIB;
 
        install_exec_creds(bprm);
-       current->flags &= ~PF_FORKNOEXEC;
 
        set_binfmt(&flat_format);
 
index ec15972dd98acfd177065901b7f5c6041b7b16fa..e4fc746629a70000dc2ace0aac62038717add3f1 100644 (file)
@@ -225,7 +225,6 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                goto out_free;
 
        /* OK, This is the point of no return */
-       current->flags &= ~PF_FORKNOEXEC;
        current->personality = PER_HPUX;
        setup_new_exec(bprm);
 
index 2c5ae338773cb7a834586f04ae4ef49d6bcd746f..60478a0e7a3728f4e4f49842ede2dbae2e0d0dfb 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1110,7 +1110,7 @@ int flush_old_exec(struct linux_binprm * bprm)
        bprm->mm = NULL;                /* We're using it now */
 
        set_fs(USER_DS);
-       current->flags &= ~(PF_RANDOMIZE | PF_KTHREAD);
+       current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD);
        flush_thread();
        current->personality &= ~bprm->per_clear;