Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgroup namespaces: ignore the nsroot in cgroup namespaces
If our cgroups were mounted in a cgroup namespace rooted at /a/b, then a task in namespaced cgroup / will see / in /proc/self/mountinfo and /sys/fs/cgroup/freezer/x will actually point to /a/b/x - but the 'root' field (field 3) in mountinfo will show /a/b. So as to not confuse the cgroup calculation, check for nsroot=/a/b in the last field, which will allow us to disambiguate between a mount like above, and a bind mount of the /a/b cgroup directory. Signed-off-by: Serge Hallyn <[email protected]>
- Loading branch information