Loading fs/exec.c +7 −1 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,13 @@ int flush_old_exec(struct linux_binprm * bprm) flush_thread(); current->personality &= ~bprm->per_clear; /* * We have to apply CLOEXEC before we change whether the process is * dumpable (in setup_new_exec) to avoid a race with a process in userspace * trying to access the should-be-closed file descriptors of a process * undergoing exec(2). */ do_close_on_exec(current->files); return 0; out: Loading Loading @@ -1144,7 +1151,6 @@ void setup_new_exec(struct linux_binprm * bprm) current->self_exec_id++; flush_signal_handlers(current, 0); do_close_on_exec(current->files); } EXPORT_SYMBOL(setup_new_exec); Loading Loading
fs/exec.c +7 −1 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,13 @@ int flush_old_exec(struct linux_binprm * bprm) flush_thread(); current->personality &= ~bprm->per_clear; /* * We have to apply CLOEXEC before we change whether the process is * dumpable (in setup_new_exec) to avoid a race with a process in userspace * trying to access the should-be-closed file descriptors of a process * undergoing exec(2). */ do_close_on_exec(current->files); return 0; out: Loading Loading @@ -1144,7 +1151,6 @@ void setup_new_exec(struct linux_binprm * bprm) current->self_exec_id++; flush_signal_handlers(current, 0); do_close_on_exec(current->files); } EXPORT_SYMBOL(setup_new_exec); Loading