diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-04-12 09:42:34 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-04-12 09:42:34 +0200 |
| commit | ef389b734691cdc8beb009dd402135dcdcb86a56 (patch) | |
| tree | 9523a37db93cb7c7874a5f18b4d9a7014898b814 /kernel/cgroup/cgroup.c | |
| parent | x86/apic: Fix signedness bug in APIC ID validity checks (diff) | |
| parent | syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention (diff) | |
| download | linux-ef389b734691cdc8beb009dd402135dcdcb86a56.tar.gz linux-ef389b734691cdc8beb009dd402135dcdcb86a56.zip | |
Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready
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)) |
