mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
Revert "cgroup-util: Don't try to open pidfd for kernel threads"
The kernel patch was reverted so let's try again to open pidfds
for kernel threads.
This reverts commit ead48ec35c
.
This commit is contained in:
parent
bdf75118ba
commit
1ce69e0661
@ -149,9 +149,7 @@ int cg_read_pidref(FILE *f, PidRef *ret, CGroupFlags flags) {
|
|||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
return -EREMOTE;
|
return -EREMOTE;
|
||||||
|
|
||||||
/* We might read kernel thread pids from cgroup.procs for which we cannot create a pidfd so
|
if (FLAGS_SET(flags, CGROUP_NO_PIDFD)) {
|
||||||
* 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) {
|
|
||||||
*ret = PIDREF_MAKE_FROM_PID(pid);
|
*ret = PIDREF_MAKE_FROM_PID(pid);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user