From a7148f82a1c839042d5bd5d2713a21c2774f6813 Mon Sep 17 00:00:00 2001 From: Marco Ballesio Date: Thu, 11 Feb 2021 14:42:25 -0800 Subject: [PATCH] libprocessgroup: adopt cgroup v2 freezer search path With the new uid/pid hierarchy the search path looks into uid_0, which is always present. Bug: 168907513 Test: verified that the cgroup v2 hierarchy works correctly in normal mode Test: verified that the cgroup v2 hierarchy works correctly in recovery mode Change-Id: If33594e4891128148da64bed47e68fa74667013d --- libprocessgroup/include/processgroup/processgroup.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libprocessgroup/include/processgroup/processgroup.h b/libprocessgroup/include/processgroup/processgroup.h index 1cadc9fea..1aaed7bac 100644 --- a/libprocessgroup/include/processgroup/processgroup.h +++ b/libprocessgroup/include/processgroup/processgroup.h @@ -36,7 +36,8 @@ bool SetProcessProfiles(uid_t uid, pid_t pid, const std::vector& pr static constexpr const char* CGROUPS_RC_PATH = "/dev/cgroup_info/cgroup.rc"; // Path to test against for freezer support -static constexpr const char* CGROUP_FREEZE_PATH = "/sys/fs/cgroup/freezer/cgroup.freeze"; +// TODO: remove and replace with a function call, see http://b/180056337 +static constexpr const char* CGROUP_FREEZE_PATH = "/sys/fs/cgroup/uid_0/cgroup.freeze"; bool UsePerAppMemcg();