Files
runc/libcontainer/cgroups
Kir Kolyshkin c85cd2b325 libct/cg/fs/cpuset: don't parse mountinfo
In cgroup v1, the parent of a cgroup mount is on tmpfs
(or maybe any other fs but definitely not cgroupfs).

Use this to traverse up the tree until we reach non-cgroupfs.

This should work in any setups (nested container, non-standard
cgroup mounts) so issue [1] won't happen.

Theoretically, the only problematic case is when someone mounts
cpuset cgroupfs into a directory on another cgroupfs. Let's
assume people don't do that -- if they do, they will get other
error (e.g. inability to read cpuset.cpus file).

[1] https://github.com/opencontainers/runc/issues/1367

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-06 14:54:22 -08:00
..