aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorChristian Brauner <[email protected]>2025-04-03 14:09:03 +0000
committerChristian Brauner <[email protected]>2025-04-07 07:38:24 +0000
commit8cf4b738f6d84fdd8d7ff1e8d0e2298ded3e4153 (patch)
treeaf530cf46f174b84cc5af25ebffcfe5522eda6f9 /net/unix/af_unix.c
parentpidfd: remove unneeded NULL check from pidfd_prepare() (diff)
downloadkernel-8cf4b738f6d84fdd8d7ff1e8d0e2298ded3e4153.tar.gz
kernel-8cf4b738f6d84fdd8d7ff1e8d0e2298ded3e4153.zip
pidfd: improve uapi when task isn't found
We currently report EINVAL whenever a struct pid has no tasked attached anymore thereby conflating two concepts: (1) The task has already been reaped. (2) The caller requested a pidfd for a thread-group leader but the pid actually references a struct pid that isn't used as a thread-group leader. This is causing issues for non-threaded workloads as in [1]. This patch tries to allow userspace to distinguish between (1) and (2). This is racy of course but that shouldn't matter. Link: https://github.com/systemd/systemd/pull/36982 [1] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Oleg Nesterov <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions