Skip to content

Commit 19e5109

Browse files
author
Al Viro
committed
take removal of PF_FORKNOEXEC to flush_old_exec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent e59cc47 commit 19e5109

7 files changed

Lines changed: 1 addition & 10 deletions

File tree

‎arch/x86/ia32/ia32_aout.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
323323
}
324324

325325
install_exec_creds(bprm);
326-
current->flags &= ~PF_FORKNOEXEC;
327326

328327
if (N_MAGIC(ex) == OMAGIC) {
329328
unsigned long text_addr, map_size;

‎fs/binfmt_aout.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
267267
}
268268

269269
install_exec_creds(bprm);
270-
current->flags &= ~PF_FORKNOEXEC;
271270

272271
if (N_MAGIC(ex) == OMAGIC) {
273272
unsigned long text_addr, map_size;

‎fs/binfmt_elf.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
712712
goto out_free_dentry;
713713

714714
/* OK, This is the point of no return */
715-
current->flags &= ~PF_FORKNOEXEC;
716715
current->mm->def_flags = def_flags;
717716

718717
/* 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)
934933
#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
935934

936935
install_exec_creds(bprm);
937-
current->flags &= ~PF_FORKNOEXEC;
938936
retval = create_elf_tables(bprm, &loc->elf_ex,
939937
load_addr, interp_load_addr);
940938
if (retval < 0) {

‎fs/binfmt_elf_fdpic.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
335335
current->mm->context.exec_fdpic_loadmap = 0;
336336
current->mm->context.interp_fdpic_loadmap = 0;
337337

338-
current->flags &= ~PF_FORKNOEXEC;
339-
340338
#ifdef CONFIG_MMU
341339
elf_fdpic_arch_lay_out_mm(&exec_params,
342340
&interp_params,
@@ -414,7 +412,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
414412
#endif
415413

416414
install_exec_creds(bprm);
417-
current->flags &= ~PF_FORKNOEXEC;
418415
if (create_elf_fdpic_tables(bprm, current->mm,
419416
&exec_params, &interp_params) < 0)
420417
goto error_kill;

‎fs/binfmt_flat.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs)
902902
libinfo.lib_list[j].start_data:UNLOADED_LIB;
903903

904904
install_exec_creds(bprm);
905-
current->flags &= ~PF_FORKNOEXEC;
906905

907906
set_binfmt(&flat_format);
908907

‎fs/binfmt_som.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs)
225225
goto out_free;
226226

227227
/* OK, This is the point of no return */
228-
current->flags &= ~PF_FORKNOEXEC;
229228
current->personality = PER_HPUX;
230229
setup_new_exec(bprm);
231230

‎fs/exec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ int flush_old_exec(struct linux_binprm * bprm)
11101110
bprm->mm = NULL; /* We're using it now */
11111111

11121112
set_fs(USER_DS);
1113-
current->flags &= ~(PF_RANDOMIZE | PF_KTHREAD);
1113+
current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD);
11141114
flush_thread();
11151115
current->personality &= ~bprm->per_clear;
11161116

0 commit comments

Comments
 (0)