mm_for_maps: shift down_read(mmap_sem) to the caller
[pandora-kernel.git] / fs / binfmt_misc.c
index 8d7e88e..f2744ab 100644 (file)
@@ -117,7 +117,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
                goto _ret;
 
        retval = -ENOEXEC;
-       if (bprm->misc_bang)
+       if (bprm->recursion_depth > BINPRM_MAX_RECURSION)
                goto _ret;
 
        /* to keep locking time low, we copy the interpreter string */
@@ -197,7 +197,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        if (retval < 0)
                goto _error;
 
-       bprm->misc_bang = 1;
+       bprm->recursion_depth++;
 
        retval = search_binary_handler (bprm, regs);
        if (retval < 0)