X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fbinfmt_misc.c;h=7191306367c5d11912ceed01c5fce4925b528eba;hb=6aa5fc434958d15a4d66d922d0416dfb03c07def;hp=dbf0ac0523de14d49edcc58b43ab7c62a407e406;hpb=064922a805ec7aadfafdd27aa6b4908d737c3c1d;p=mv-sheeva.git diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index dbf0ac0523d..7191306367c 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -115,6 +115,12 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) if (!enabled) goto _ret; + retval = -ENOEXEC; + if (bprm->misc_bang) + goto _ret; + + bprm->misc_bang = 1; + /* to keep locking time low, we copy the interpreter string */ read_lock(&entries_lock); fmt = check_file(bprm);