Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgroups: forbid noprefix if mounting more than just cpuset subsystem
The 'noprefix' option was introduced for backwards-compatibility of cpuset, but actually it can be used when mounting other subsystems. This results in possibility of name collision, and now the collision can really happen, because we have 'stat' file in both memory and cpuacct subsystem: # mount -t cgroup -o noprefix,memory,cpuacct xxx /mnt Cgroup will happily mount the 2 subsystems, but only 'stat' file of memory subsys can be seen. We don't want users to use nopreifx, and also want to avoid name collision, so we change to allow noprefix only if mounting just the cpuset subsystem. [[email protected]: fix shift for cpuset_subsys_id >= 32] Signed-off-by: Li Zefan <[email protected]> Cc: Paul Menage <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Balbir Singh <[email protected]> Acked-by: Dhaval Giani <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information