summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 52e9fe7b8..96190fed2 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -715,7 +715,9 @@ do_load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
__MOD_INC_USE_COUNT(current->binfmt->module);
#ifndef VM_STACK_FLAGS
+ lock_kernel();
current->executable = dget(bprm->dentry);
+ unlock_kernel();
#endif
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;