VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: David Drysdale <drysdale@google.com> 2014-12-12 16:57:29 -0800 committer: Linus Torvalds <torvalds@linux-foundation.org> 2014-12-13 12:42:51 -0800 commit: 51f39a1f0cea1cacf8c787f652f26dfee9611874 parent: c0ef0cc9d277f0f2a83b5a287a816b3916d9f026
Commit Summary:
syscalls: implement execveat() system call
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c
index f37b08cea1f7..490538536cb4 100644
--- a/fs/binfmt_em86.c
+++ b/fs/binfmt_em86.c
@@ -42,6 +42,10 @@ static int load_em86(struct linux_binprm *bprm)
 			return -ENOEXEC;
 	}
 
+	/* Need to be able to load the file after exec */
+	if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE)
+		return -ENOENT;
+
 	allow_write_access(bprm->file);
 	fput(bprm->file);
 	bprm->file = NULL;