• Michal Koutný's avatar
    cgroup: Disallow mounting v1 hierarchies without controller implementation · 3c41382e
    Michal Koutný authored
    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: default avatarMichal Koutný <mkoutny@suse.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    3c41382e
cgroup-v1.c 35.3 KB