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.
This commit is contained in:
Mike Yuan
2024-08-02 16:36:08 +02:00
parent e563c4213e
commit 6e6d305573
+1 -4
View File
@@ -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);