diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 18bc0ff2aed..b3cd2c27a6f 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -149,9 +149,7 @@ int cg_read_pidref(FILE *f, PidRef *ret, CGroupFlags flags) { if (pid == 0) return -EREMOTE; - /* We might read kernel thread pids from cgroup.procs for which we cannot create a pidfd so - * catch those and don't try to create a pidfd for them. */ - if (FLAGS_SET(flags, CGROUP_NO_PIDFD) || pid_is_kernel_thread(pid) > 0) { + if (FLAGS_SET(flags, CGROUP_NO_PIDFD)) { *ret = PIDREF_MAKE_FROM_PID(pid); return 1; }