android_system_core/libprocessgroup
Suren Baghdasaryan 29c9e26776 libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy
When a new process is launched it ensures that all files under its uid/
and uid/pid hierarchy are accessible by the user/group of that process.
If the directory already exists that means the access permissions have
been already set before, therefore we do not need to reset them again.
This also avoids a race between two processes in the same uid with one
process being launched and walking the uid/ directory while the other
process is being killed and changing the content of that directory. In
such a race the process walking uid/ might find the uid/pid directory of
the process being killed but by the time it tries to set its permissions
the directory might be removed because the process got killed. The
change eliminates the possibility of this race.

Bug: 192421915
Bug: 192512069
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I182298c36f6b0b4580ab59e440bd3aea16f5fbfe
Merged-In: I182298c36f6b0b4580ab59e440bd3aea16f5fbfe
2021-07-07 19:42:25 +00:00
..
cgrouprc Replace llndk_library with llndk clause in cc_library 2021-04-21 19:13:41 -07:00
cgrouprc_format [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
include/processgroup libprocessgroup: remove hardcoded freezer path 2021-02-25 23:39:52 +00:00
profiles task_profiles.json: add taskprofile for SurfaceFlinger 2021-06-15 15:18:23 -07:00
setup libprocessgroup: introduce optional attribute for cgroup controllers 2021-03-11 17:42:30 +00:00
Android.bp [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
cgroup_map.cpp Cgroup APIs are guarded 2021-01-12 20:50:27 +09:00
cgroup_map.h Fix IsUsable to check for each controller separately 2019-06-26 11:35:11 -07:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
processgroup.cpp libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy 2021-07-07 19:42:25 +00:00
sched_policy.cpp libprocessgroup: Fix warnings when legacy schedtune cgroup is absent 2021-04-26 09:28:08 -07:00
task_profiles.cpp Merge "libprocessgroup: remove failure log for aggregate profiles" 2021-05-14 22:06:37 +00:00
task_profiles.h libprocessgroup: Add control of printing log in WriteFileAction 2021-01-28 03:26:18 +00:00