Commit 3c41382
cgroup: Disallow mounting v1 hierarchies without controller implementation
The configs that disable some v1 controllers would still allow mounting
them but with no controller-specific files. (Making such hierarchies
equivalent to named v1 hierarchies.) To achieve behavior consistent with
actual out-compilation of a whole controller, the mounts should treat
respective controllers as non-existent.
Wrap implementation into a helper function, leverage legacy_files to
detect compiled out controllers. The effect is that mounts on v1 would
fail and produce a message like:
[ 1543.999081] cgroup: Unknown subsys name 'memory'
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent 659f90f commit 3c41382
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
932 | 938 | | |
933 | 939 | | |
934 | 940 | | |
935 | | - | |
| 941 | + | |
| 942 | + | |
936 | 943 | | |
937 | 944 | | |
938 | 945 | | |
| |||
1024 | 1031 | | |
1025 | 1032 | | |
1026 | 1033 | | |
1027 | | - | |
| 1034 | + | |
| 1035 | + | |
1028 | 1036 | | |
1029 | 1037 | | |
1030 | 1038 | | |
| |||
0 commit comments