Commit 45531757b45cae0ce64c5aff08c2534d5a0fa3e7

Authored by Daniel Lezcano
Committed by Linus Torvalds
1 parent f4a2589fea

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>

Showing 2 changed files with 25 additions and 0 deletions Side-by-side Diff

Documentation/feature-removal-schedule.txt
... ... @@ -526,6 +526,23 @@
526 526  
527 527 ----------------------------
528 528  
  529 +What: namespace cgroup (ns_cgroup)
  530 +When: 2.6.38
  531 +Why: The ns_cgroup leads to some problems:
  532 + * cgroup creation is out-of-control
  533 + * cgroup name can conflict when pids are looping
  534 + * it is not possible to have a single process handling
  535 + a lot of namespaces without falling in a exponential creation time
  536 + * we may want to create a namespace without creating a cgroup
  537 +
  538 + The ns_cgroup is replaced by a compatibility flag 'clone_children',
  539 + where a newly created cgroup will copy the parent cgroup values.
  540 + The userspace has to manually create a cgroup and add a task to
  541 + the 'tasks' file.
  542 +Who: Daniel Lezcano <daniel.lezcano@free.fr>
  543 +
  544 +----------------------------
  545 +
529 546 What: iwlwifi disable_hw_scan module parameters
530 547 When: 2.6.40
531 548 Why: Hareware scan is the prefer method for iwlwifi devices for
... ... @@ -85,6 +85,14 @@
85 85 return ERR_PTR(-EPERM);
86 86 if (!cgroup_is_descendant(cgroup, current))
87 87 return ERR_PTR(-EPERM);
  88 + if (test_bit(CGRP_CLONE_CHILDREN, &cgroup->flags)) {
  89 + printk("ns_cgroup can't be created with parent "
  90 + "'clone_children' set.\n");
  91 + return ERR_PTR(-EINVAL);
  92 + }
  93 +
  94 + printk_once("ns_cgroup deprecated: consider using the "
  95 + "'clone_children' flag without the ns_cgroup.\n");
88 96  
89 97 ns_cgroup = kzalloc(sizeof(*ns_cgroup), GFP_KERNEL);
90 98 if (!ns_cgroup)