Re: [PATCH] [RFC] cgroup: reject cgroup names with non-printing characters
From: Tejun Heo <tj@kernel.org>
Date: 2014-08-17 13:42:06
Also in:
lkml
From: Tejun Heo <tj@kernel.org>
Date: 2014-08-17 13:42:06
Also in:
lkml
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