From c0e18b96fb5bafac62bbd00953a6279641f3d0b4 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Mon, 20 Jul 2015 11:48:53 -0700 Subject: [PATCH] Fix subsystem path with abs parent Sometimes subsystem can be mounted to path like "subsystem1,subsystem2", so we need to handle this. Signed-off-by: Alexander Morozov --- libcontainer/cgroups/fs/apply_raw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/cgroups/fs/apply_raw.go b/libcontainer/cgroups/fs/apply_raw.go index 1954357b..c8ea761d 100644 --- a/libcontainer/cgroups/fs/apply_raw.go +++ b/libcontainer/cgroups/fs/apply_raw.go @@ -256,7 +256,7 @@ func (raw *data) path(subsystem string) (string, error) { // If the cgroup name/path is absolute do not look relative to the cgroup of the init process. if filepath.IsAbs(raw.cgroup) { - return filepath.Join(raw.root, subsystem, raw.cgroup), nil + return filepath.Join(raw.root, filepath.Base(mnt), raw.cgroup), nil } parent, err := raw.parent(subsystem, mnt, src)