]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/binfmt_misc.c
vfs: make fchmodat retry once on ESTALE errors
[mirror_ubuntu-bionic-kernel.git] / fs / binfmt_misc.c
index 790b3cddca673284c00d78cb80a68fb550568aff..9be335fb8a7cd3f9f480d0c5a46de7cfbcdd1c1f 100644 (file)
@@ -104,7 +104,7 @@ static Node *check_file(struct linux_binprm *bprm)
 /*
  * the loader itself
  */
-static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+static int load_misc_binary(struct linux_binprm *bprm)
 {
        Node *fmt;
        struct file * interp_file = NULL;
@@ -117,10 +117,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        if (!enabled)
                goto _ret;
 
-       retval = -ENOEXEC;
-       if (bprm->recursion_depth > BINPRM_MAX_RECURSION)
-               goto _ret;
-
        /* to keep locking time low, we copy the interpreter string */
        read_lock(&entries_lock);
        fmt = check_file(bprm);
@@ -197,9 +193,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        if (retval < 0)
                goto _error;
 
-       bprm->recursion_depth++;
-
-       retval = search_binary_handler (bprm, regs);
+       retval = search_binary_handler(bprm);
        if (retval < 0)
                goto _error;