android_kernel_motorola_sm6375/kernel/cgroup
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yafang Shao 92f6ebead8 cgroup: Make operations on the cgroup root_list RCU safe
commit d23b5c577715892c87533b13923306acc6243f93 upstream.

At present, when we perform operations on the cgroup root_list, we must
hold the cgroup_mutex, which is a relatively heavyweight lock. In reality,
we can make operations on this list RCU-safe, eliminating the need to hold
the cgroup_mutex during traversal. Modifications to the list only occur in
the cgroup root setup and destroy paths, which should be infrequent in a
production environment. In contrast, traversal may occur frequently.
Therefore, making it RCU-safe would be beneficial.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
[fp: adapt to 5.10 mainly because of changes made by e210a89f5b07
 ("cgroup.c: add helper __cset_cgroup_from_root to cleanup duplicated
 codes")]
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
[Shivani: Modified to apply on v5.4.y]
Signed-off-by: Shivani Agarwal <shivani.agarwal@broadcom.com>
Reviewed-by: Siddh Raman Pant <siddh.raman.pant@oracle.com>
Signed-off-by: Siddh Raman Pant <siddh.raman.pant@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-14 19:44:35 +01:00
..
cgroup-internal.h cgroup: Make operations on the cgroup root_list RCU safe 2024-12-14 19:44:35 +01:00
cgroup-v1.c cgroup: Remove duplicates in cgroup v1 tasks file 2023-10-25 11:53:19 +02:00
cgroup.c cgroup: Make operations on the cgroup root_list RCU safe 2024-12-14 19:44:35 +01:00
cpuset.c cgroup/cpuset: Prevent UAF in proc_cpuset_show() 2024-09-04 13:15:03 +02:00
debug.c
freezer.c
legacy_freezer.c
Makefile
namespace.c
pids.c
rdma.c
rstat.c