summaryrefslogtreecommitdiffstats
path: root/libprocessgroup/cgroup_map.h
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2019-03-26 20:34:32 +0000
committerSuren Baghdasaryan <surenb@google.com>2019-03-28 01:25:22 +0000
commit5b5357367163a6238c45c020c9e5ff0dbaa31f59 (patch)
tree748900a5bbdd1b926b2aeea326430d018882e80c /libprocessgroup/cgroup_map.h
parent7f43e9fa40d5440f77a9a0b46edaad9d1b69bd8a (diff)
downloadsystem_core-5b5357367163a6238c45c020c9e5ff0dbaa31f59.tar.gz
system_core-5b5357367163a6238c45c020c9e5ff0dbaa31f59.tar.bz2
system_core-5b5357367163a6238c45c020c9e5ff0dbaa31f59.zip
libprocessgroup: restrict SetupCgroups to one-time usage and only by init
SetupCgroups is called by init process during early-init stage and is not supposed to be called again by anyone else. Ensure that the caller is the init process, make sure cgroup.rc file is written only one time, keep the file descriptor to cgroup.rc file open by the init process to ensure all its further mappings stay valid even if the file is deleted. Bug: 124774415 Test: build, run, verify no errors or warning in the logcat Change-Id: Ib8822cf0112db7744e28d442182d54dcf06f46f2 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'libprocessgroup/cgroup_map.h')
-rw-r--r--libprocessgroup/cgroup_map.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/libprocessgroup/cgroup_map.h b/libprocessgroup/cgroup_map.h
index 1c355cd17..304ae155e 100644
--- a/libprocessgroup/cgroup_map.h
+++ b/libprocessgroup/cgroup_map.h
@@ -75,8 +75,6 @@ struct CgroupFile {
class CgroupMap {
public:
- static constexpr const char* CGROUPS_RC_FILE = "cgroup.rc";
-
// Selinux policy ensures only init process can successfully use this function
static bool SetupCgroups();