[Devel] [PATCH RH9 v2 4/5] cgroup: allow to write to cgroup.subtree_control in ct root cgroup

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Sep 6 06:14:08 MSK 2023


This way systemd in container on cgroup-v2 can enable the controllers it
requires.

https://jira.vzint.dev/browse/PSBM-149975
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 kernel/cgroup/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index b0cf5cf66d20..945130057a30 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5482,7 +5482,7 @@ static struct cftype cgroup_base_files[] = {
 	},
 	{
 		.name = "cgroup.subtree_control",
-		.flags = CFTYPE_NS_DELEGATABLE,
+		.flags = CFTYPE_NS_DELEGATABLE | CFTYPE_VE_WRITABLE,
 		.seq_show = cgroup_subtree_control_show,
 		.write = cgroup_subtree_control_write,
 	},
-- 
2.41.0



More information about the Devel mailing list