mirror of
https://github.com/torvalds/linux
synced 2024-11-02 18:48:59 +00:00
cgroup: notify ns_cgroup deprecated
The ns_cgroup will be removed very soon. Let's warn, for this version, ns_cgroup is deprecated. Make ns_cgroup and clone_children exclusive. If the clone_children is set and the ns_cgroup is mounted, let's fail with EINVAL when the ns_cgroup subsys is created (a printk will help the user to understand why the creation fails). Update the feature remove schedule file with the deprecated ns_cgroup. Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f4a2589fea
commit
45531757b4
2 changed files with 25 additions and 0 deletions
|
@ -526,6 +526,23 @@ Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
||||||
|
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
What: namespace cgroup (ns_cgroup)
|
||||||
|
When: 2.6.38
|
||||||
|
Why: The ns_cgroup leads to some problems:
|
||||||
|
* cgroup creation is out-of-control
|
||||||
|
* cgroup name can conflict when pids are looping
|
||||||
|
* it is not possible to have a single process handling
|
||||||
|
a lot of namespaces without falling in a exponential creation time
|
||||||
|
* we may want to create a namespace without creating a cgroup
|
||||||
|
|
||||||
|
The ns_cgroup is replaced by a compatibility flag 'clone_children',
|
||||||
|
where a newly created cgroup will copy the parent cgroup values.
|
||||||
|
The userspace has to manually create a cgroup and add a task to
|
||||||
|
the 'tasks' file.
|
||||||
|
Who: Daniel Lezcano <daniel.lezcano@free.fr>
|
||||||
|
|
||||||
|
----------------------------
|
||||||
|
|
||||||
What: iwlwifi disable_hw_scan module parameters
|
What: iwlwifi disable_hw_scan module parameters
|
||||||
When: 2.6.40
|
When: 2.6.40
|
||||||
Why: Hareware scan is the prefer method for iwlwifi devices for
|
Why: Hareware scan is the prefer method for iwlwifi devices for
|
||||||
|
|
|
@ -85,6 +85,14 @@ static struct cgroup_subsys_state *ns_create(struct cgroup_subsys *ss,
|
||||||
return ERR_PTR(-EPERM);
|
return ERR_PTR(-EPERM);
|
||||||
if (!cgroup_is_descendant(cgroup, current))
|
if (!cgroup_is_descendant(cgroup, current))
|
||||||
return ERR_PTR(-EPERM);
|
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);
|
ns_cgroup = kzalloc(sizeof(*ns_cgroup), GFP_KERNEL);
|
||||||
if (!ns_cgroup)
|
if (!ns_cgroup)
|
||||||
|
|
Loading…
Reference in a new issue