From 5c39797624793be5d7bfd143a0a35d357840214d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 30 Jun 2022 14:34:18 +0200 Subject: utils: move the cgroup if root on cgroupv2 if we are running on cgroupv2, force the creation of a sub-cgroup even when we are at the root for the cgroup v2 unified mount. Signed-off-by: Giuseppe Scrivano --- utils/utils_supported.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils_supported.go b/utils/utils_supported.go index c2dcc4631..6378212b6 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -137,7 +137,7 @@ func moveUnderCgroup(cgroup, subtree string, processes []uint32) error { } // root cgroup, skip it - if parts[2] == "/" { + if parts[2] == "/" && !(unifiedMode && parts[1] == "") { continue } -- cgit v1.2.3-54-g00ecf