aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_aout.c1
-rw-r--r--fs/binfmt_elf.c2
-rw-r--r--fs/binfmt_elf_fdpic.c3
-rw-r--r--fs/binfmt_flat.c1
-rw-r--r--fs/binfmt_som.c1
-rw-r--r--fs/exec.c2
6 files changed, 1 insertions, 9 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index a543364ba29b..4d5e6d26578c 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -267,7 +267,6 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
267 } 267 }
268 268
269 install_exec_creds(bprm); 269 install_exec_creds(bprm);
270 current->flags &= ~PF_FORKNOEXEC;
271 270
272 if (N_MAGIC(ex) == OMAGIC) { 271 if (N_MAGIC(ex) == OMAGIC) {
273 unsigned long text_addr, map_size; 272 unsigned long text_addr, map_size;
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index f8ac4251877e..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) {
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index e7afcb67a2d3..c64bf5ee2df4 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -335,8 +335,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
335 current->mm->context.exec_fdpic_loadmap = 0; 335 current->mm->context.exec_fdpic_loadmap = 0;
336 current->mm->context.interp_fdpic_loadmap = 0; 336 current->mm->context.interp_fdpic_loadmap = 0;
337 337
338 current->flags &= ~PF_FORKNOEXEC;
339
340#ifdef CONFIG_MMU 338#ifdef CONFIG_MMU
341 elf_fdpic_arch_lay_out_mm(&exec_params, 339 elf_fdpic_arch_lay_out_mm(&exec_params,
342 &interp_params, 340 &interp_params,
@@ -414,7 +412,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
414#endif 412#endif
415 413
416 install_exec_creds(bprm); 414 install_exec_creds(bprm);
417 current->flags &= ~PF_FORKNOEXEC;
418 if (create_elf_fdpic_tables(bprm, current->mm, 415 if (create_elf_fdpic_tables(bprm, current->mm,
419 &exec_params, &interp_params) < 0) 416 &exec_params, &interp_params) < 0)
420 goto error_kill; 417 goto error_kill;
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 68affab88146..04f61f0bdfde 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -902,7 +902,6 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs)
902 libinfo.lib_list[j].start_data:UNLOADED_LIB; 902 libinfo.lib_list[j].start_data:UNLOADED_LIB;
903 903
904 install_exec_creds(bprm); 904 install_exec_creds(bprm);
905 current->flags &= ~PF_FORKNOEXEC;
906 905
907 set_binfmt(&flat_format); 906 set_binfmt(&flat_format);
908 907
diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c
index ec15972dd98a..e4fc746629a7 100644
--- a/fs/binfmt_som.c
+++ b/fs/binfmt_som.c
@@ -225,7 +225,6 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs)
225 goto out_free; 225 goto out_free;
226 226
227 /* OK, This is the point of no return */ 227 /* OK, This is the point of no return */
228 current->flags &= ~PF_FORKNOEXEC;
229 current->personality = PER_HPUX; 228 current->personality = PER_HPUX;
230 setup_new_exec(bprm); 229 setup_new_exec(bprm);
231 230
diff --git a/fs/exec.c b/fs/exec.c
index 2c5ae338773c..60478a0e7a37 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1110,7 +1110,7 @@ int flush_old_exec(struct linux_binprm * bprm)
1110 bprm->mm = NULL; /* We're using it now */ 1110 bprm->mm = NULL; /* We're using it now */
1111 1111
1112 set_fs(USER_DS); 1112 set_fs(USER_DS);
1113 current->flags &= ~(PF_RANDOMIZE | PF_KTHREAD); 1113 current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD);
1114 flush_thread(); 1114 flush_thread();
1115 current->personality &= ~bprm->per_clear; 1115 current->personality &= ~bprm->per_clear;
1116 1116