X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fbinfmt_em86.c;h=490538536cb44b20dde69074da93d2866e9ccd3e;hb=5cce639363fd3624ce31952119b6aba77db8c953;hp=f37b08cea1f760a061d7a5d49bf8dcaeda385ab8;hpb=e09f67f1472bb3027448251d51bd52543d0af699;p=firefly-linux-kernel-4.4.55.git 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;