From bf819b5593c7585e9e0a0434d38018a1d0f10340 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Fri, 29 Apr 2022 18:39:08 +0800 Subject: [PATCH] lmkd: fix the cgroup attribute name to MemCgroupEventControl which was CgroupEventControl before, but it's not the one that definied in system/core/libprocessgroup/profiles/task_profiles.json. And it causes lmkd crash for some setups like 4.19q + AOSP Master Bug: 230642311 Test: boot the 4.19q + AOSP master setup with hikey960 board Signed-off-by: Yongqin Liu Change-Id: I87b1ea2040f21c52d549db58692fc8a2b114f8e6 --- lmkd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmkd.cpp b/lmkd.cpp index b6c934b..13386cc 100644 --- a/lmkd.cpp +++ b/lmkd.cpp @@ -3239,7 +3239,7 @@ static bool init_mp_common(enum vmpressure_level level) { goto err_open_mpfd; } - evctlfd = open(GetCgroupAttributePath("CgroupEventControl").c_str(), O_WRONLY | O_CLOEXEC); + evctlfd = open(GetCgroupAttributePath("MemCgroupEventControl").c_str(), O_WRONLY | O_CLOEXEC); if (evctlfd < 0) { ALOGI("No kernel memory cgroup event control (errno=%d)", errno); goto err_open_evctlfd;