]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: cgroup v2 – read subtree_control of the leaf node
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 20 Dec 2022 16:09:08 +0000 (21:39 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 6 Jan 2023 15:07:23 +0000 (08:07 -0700)
commit39012eeefa454e09fc4192cacddb508ee00abee6
treee1fc9279121c066b16156b76c2a382223e993f73
parentbb291add5db87fe36a82a18c6eb6aaf64dc07694
api: cgroup v2 – read subtree_control of the leaf node

With cgroup v2, while checking if a controller is enabled for cgroup,
the tree is walked and checked up to the parent cgroup of the leaf node,
this guarantees that the controller available for the leaf cgroups in
the cgroup.controllers file, but this is incomplete because of the
controller can be both either enabled or disabled in the
cgroups.subtree_control file of the leaf cgroup.

Fix this ambiguity by reading until the leaf node's
cgroup.subtree_control file, instead.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c