X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fbinfmt_misc.c;h=7191306367c5d11912ceed01c5fce4925b528eba;hb=f3d47a3a6a1484a93c8cfe1e8c8d4399c95199c7;hp=dbf0ac0523de14d49edcc58b43ab7c62a407e406;hpb=92794a5d6359f9e8ed0d43fe0f3c653f748dcc90;p=linux-2.6-omap-h63xx.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);