diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-07-30 20:35:10 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-08-02 16:36:08 +0200 |
commit | 6e6d305573458c640b97046667bb39a0d0e6bfa8 (patch) | |
tree | 70302e3f98ed8e104000416ad87d2a833629c622 | |
parent | cgroup-setup: drop unneeded O_RDONLY when O_DIRECTORY (diff) | |
download | systemd-6e6d305573458c640b97046667bb39a0d0e6bfa8.tar.xz systemd-6e6d305573458c640b97046667bb39a0d0e6bfa8.zip |
cgroup-setup: kernel threads can reside in arbitrary cgroups
Realistically this doesn't matter, as cg_migrate() is only
used to populate init.scope. But it's probably better to
make things clear.
-rw-r--r-- | src/shared/cgroup-setup.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c index 6292777369..cf7a0eb272 100644 --- a/src/shared/cgroup-setup.c +++ b/src/shared/cgroup-setup.c @@ -639,10 +639,7 @@ int cg_migrate( if (set_contains(s, PID_TO_PTR(pid))) continue; - /* Ignore kernel threads. Since they can only exist in the root cgroup, we only - * check for them there. */ - if (cfrom && empty_or_root(pfrom) && - pid_is_kernel_thread(pid) > 0) + if (pid_is_kernel_thread(pid) > 0) continue; r = cg_attach(cto, pto, pid); |