]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
cgroup: deprecate remount option changes
authorTejun Heo <tj@kernel.org>
Sun, 1 Apr 2012 19:09:54 +0000 (12:09 -0700)
committerTejun Heo <tj@kernel.org>
Sun, 1 Apr 2012 19:09:54 +0000 (12:09 -0700)
This patch marks the following features for deprecation.

* Rebinding subsys by remount: Never reached useful state - only works
  on empty hierarchies.

* release_agent update by remount: release_agent itself will be
  replaced with conventional fsnotify notification.

v2: Lennart pointed out that "name=" is necessary for mounts w/o any
    controller attached.  Drop "name=" deprecation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Documentation/feature-removal-schedule.txt
kernel/cgroup.c

index c1be8066ea5914c33e9a7aacbfee66f8455741b2..5298e126cea380d6ec88f6fda678e8c3720e8f38 100644 (file)
@@ -539,3 +539,12 @@ Why:       There appear to be no production users of the get_robust_list syscall,
        of ASLR. It was only ever intended for debugging, so it should be
        removed.
 Who:   Kees Cook <keescook@chromium.org>
+
+----------------------------
+
+What:  cgroup option updates via remount
+When:  March 2013
+Why:   Remount currently allows changing bound subsystems and
+       release_agent.  Rebinding is hardly useful as it only works
+       when the hierarchy is empty and release_agent itself should be
+       replaced with conventional fsnotify.
index ed64ccac67c9707d0b4310227eb84d820710fbec..741c120e06c17feb069ff26317ee716d4bdb6a8c 100644 (file)
@@ -1294,6 +1294,11 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data)
        if (ret)
                goto out_unlock;
 
+       /* See feature-removal-schedule.txt */
+       if (opts.subsys_bits != root->actual_subsys_bits || opts.release_agent)
+               pr_warning("cgroup: option changes via remount are deprecated (pid=%d comm=%s)\n",
+                          task_tgid_nr(current), current->comm);
+
        /* Don't allow flags or name to change at remount */
        if (opts.flags != root->flags ||
            (opts.name && strcmp(opts.name, root->name))) {