diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-03-27 08:43:39 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-03-27 08:43:39 +0200 |
commit | 0bc91d4ba77156ae9217d25ed7c434540f950d05 (patch) | |
tree | 949c1acf27b106184d8842586740fbbcc9c9ea62 /kernel/cgroup/cgroup.c | |
parent | 565977a3d929fc4427769117a8ac976ec16776d5 (diff) | |
parent | 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (diff) |
Merge tag 'v4.16-rc7' into x86/mm, to fix up conflict
Conflicts:
arch/x86/mm/init_64.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/cgroup/cgroup.c')
-rw-r--r-- | kernel/cgroup/cgroup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 8cda3bc3ae22..4bfb2908ec15 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -3183,6 +3183,16 @@ static int cgroup_enable_threaded(struct cgroup *cgrp) if (cgroup_is_threaded(cgrp)) return 0; + /* + * If @cgroup is populated or has domain controllers enabled, it + * can't be switched. While the below cgroup_can_be_thread_root() + * test can catch the same conditions, that's only when @parent is + * not mixable, so let's check it explicitly. + */ + if (cgroup_is_populated(cgrp) || + cgrp->subtree_control & ~cgrp_dfl_threaded_ss_mask) + return -EOPNOTSUPP; + /* we're joining the parent's domain, ensure its validity */ if (!cgroup_is_valid_domain(dom_cgrp) || !cgroup_can_be_thread_root(dom_cgrp)) |