Commit 8b5a5a9dbca914d1f7d70276024d1525a3c94081
1 parent
dd775ae254
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
cgroup: deprecate remount option changes
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>
Showing 2 changed files with 14 additions and 0 deletions Side-by-side Diff
Documentation/feature-removal-schedule.txt
... | ... | @@ -539,4 +539,13 @@ |
539 | 539 | of ASLR. It was only ever intended for debugging, so it should be |
540 | 540 | removed. |
541 | 541 | Who: Kees Cook <keescook@chromium.org> |
542 | + | |
543 | +---------------------------- | |
544 | + | |
545 | +What: cgroup option updates via remount | |
546 | +When: March 2013 | |
547 | +Why: Remount currently allows changing bound subsystems and | |
548 | + release_agent. Rebinding is hardly useful as it only works | |
549 | + when the hierarchy is empty and release_agent itself should be | |
550 | + replaced with conventional fsnotify. |
kernel/cgroup.c
... | ... | @@ -1294,6 +1294,11 @@ |
1294 | 1294 | if (ret) |
1295 | 1295 | goto out_unlock; |
1296 | 1296 | |
1297 | + /* See feature-removal-schedule.txt */ | |
1298 | + if (opts.subsys_bits != root->actual_subsys_bits || opts.release_agent) | |
1299 | + pr_warning("cgroup: option changes via remount are deprecated (pid=%d comm=%s)\n", | |
1300 | + task_tgid_nr(current), current->comm); | |
1301 | + | |
1297 | 1302 | /* Don't allow flags or name to change at remount */ |
1298 | 1303 | if (opts.flags != root->flags || |
1299 | 1304 | (opts.name && strcmp(opts.name, root->name))) { |