X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=kernel%2Fns_cgroup.c;h=2c98ad94ba0ee4b5313bf5f1add92281044e789a;hb=b83db1deb29eb4eea9bf5992431d26978e039ce6;hp=2a5dfec8efe0504fc974a9500e934c51b78a5207;hpb=ef26b1691d11e17af205a4ff9c91458d931d11db;p=mirror_ubuntu-artful-kernel.git diff --git a/kernel/ns_cgroup.c b/kernel/ns_cgroup.c index 2a5dfec8efe0..2c98ad94ba0e 100644 --- a/kernel/ns_cgroup.c +++ b/kernel/ns_cgroup.c @@ -85,6 +85,14 @@ static struct cgroup_subsys_state *ns_create(struct cgroup_subsys *ss, return ERR_PTR(-EPERM); if (!cgroup_is_descendant(cgroup, current)) return ERR_PTR(-EPERM); + if (test_bit(CGRP_CLONE_CHILDREN, &cgroup->flags)) { + printk("ns_cgroup can't be created with parent " + "'clone_children' set.\n"); + return ERR_PTR(-EINVAL); + } + + printk_once("ns_cgroup deprecated: consider using the " + "'clone_children' flag without the ns_cgroup.\n"); ns_cgroup = kzalloc(sizeof(*ns_cgroup), GFP_KERNEL); if (!ns_cgroup)