Re: [PATCH] [RFC] cgroup: reject cgroup names with non-printing characters

From: Tejun Heo
Date: Sun Aug 17 2014 - 09:42:10 EST


Hello, Alban.

Sorry about the delay.

On Mon, Jul 21, 2014 at 04:11:56PM +0100, Alban Crequy wrote:
> @@ -4387,6 +4401,11 @@ static int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name,
> struct kernfs_node *kn;
> int ssid, ret;
>
> + /* do not create cgroups with bad names */
> + ret = cgroup_is_used_badchars(name);
> + if (ret)
> + return ret;

Let's just reject '\n'. That should give us a way to parse the path
correctly and I don't want to put more-than-necessary interpretation
on the path string.

Thanks.

--
tejun
--
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/