]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: bring list of delegated cgroup attributes up-to-date with current kernels
authorLennart Poettering <lennart@poettering.net>
Tue, 12 Dec 2023 09:54:55 +0000 (10:54 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Dec 2023 08:58:45 +0000 (09:58 +0100)
THis brings the list of attributes to delegate to managers of subcgroups
to the state of kernel 6.6.

We probably should unify this list, and maybe generate it automatically
from /sys/kernel/cgroup/delegate, but let's do that another time.

src/nspawn/nspawn-cgroup.c
src/shared/cgroup-setup.c

index a9d36627a86bed8eee47bf2e081425dc35c44c39..a5002437c6f7914d5b892e70afa0d2c5b06bc9d1 100644 (file)
@@ -35,6 +35,8 @@ static int chown_cgroup_path(const char *path, uid_t uid_shift) {
                        "cgroup.stat",
                        "cgroup.subtree_control",
                        "cgroup.threads",
+                       "memory.oom.group",
+                       "memory.reclaim",
                        "notify_on_release",
                        "tasks")
                 if (fchownat(fd, fn, uid_shift, uid_shift, 0) < 0)
index 811f129f6cd9bc4747af683b0a792fa7c0286a3f..934a16eaf389e249d21918ba4a32192949d90fce 100644 (file)
@@ -421,6 +421,8 @@ int cg_set_access(
                 { "cgroup.procs",           true  },
                 { "cgroup.subtree_control", true  },
                 { "cgroup.threads",         false },
+                { "memory.oom.group",       false },
+                { "memory.reclaim",         false },
                 {},
         };