Re: [PATCH v2 2/3] fs/binfmts: Better handling of binfmt loops

From: Zach Levis
Date: Fri Aug 02 2013 - 18:49:37 EST


On 08/02/2013 03:12 PM, Zach Levis wrote:

+ if (retval == -ELOOP && bprm->recursion_depth == 0) { /* cur, previous */
+ pr_err("Too much recursion with binfmts (0:%s, -1:%s) in file %s, skipping (base %s).\n",
+ bprm->previous_binfmts[0]->name,
+ bprm->previous_binfmts[1]->name,
+ bprm->filename,
+ fmt->name);
+
+ /* Put argv back in its place */
+ bprm->p = bprm->p_no_argv;
+
+ bprm->argc = count(*(bprm->argv_orig), MAX_ARG_STRINGS);
+ retval = copy_strings(bprm->argc, *(bprm->argv_orig), bprm);
+ if (retval < 0)
+ return retval;
+
+ retval = -ENOEXEC;
+ continue;
+ }
}
read_unlock(&binfmt_lock);


NEVERMIND, I messed up the order here so this doesn't work! v3 coming up without the stupid.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/