android-12.0.0_r32 patches

This commit is contained in:
Ziyang Zhou
2023-10-05 22:27:22 +08:00
parent b3fa25049b
commit 03a0fccccd
18 changed files with 928 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
From b142c7c0ce2d63422932b7d9bf912c7240f8a025 Mon Sep 17 00:00:00 2001
From: John Tung <watchnight@163.com>
Date: Sun, 21 Aug 2022 11:23:33 +0800
Subject: [PATCH 7/8] fix cpu cgroup mount
---
libprocessgroup/setup/cgroup_map_write.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
index 3121d244b..bb15e4f6d 100644
--- a/libprocessgroup/setup/cgroup_map_write.cpp
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
@@ -309,6 +309,11 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
controller->name());
}
+ if (result < 0 && (!strcmp(controller->name(), "cpu")
+ || !strcmp(controller->name(), "cpuacct"))) {
+ result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
+ "cpu,cpuacct");
+ }
}
if (result < 0) {
--
2.34.1