aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 7dc8788cfd52..c3d1802a9b30 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4543,6 +4543,11 @@ static int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name,
4543 struct cftype *base_files; 4543 struct cftype *base_files;
4544 int ssid, ret; 4544 int ssid, ret;
4545 4545
4546 /* Do not accept '\n' to prevent making /proc/<pid>/cgroup unparsable.
4547 */
4548 if (strchr(name, '\n'))
4549 return -EINVAL;
4550
4546 parent = cgroup_kn_lock_live(parent_kn); 4551 parent = cgroup_kn_lock_live(parent_kn);
4547 if (!parent) 4552 if (!parent)
4548 return -ENODEV; 4553 return -ENODEV;