diff options
| author | Christian Brauner <[email protected]> | 2025-04-04 14:06:55 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2025-04-07 07:38:24 +0000 |
| commit | 1e940fff94374d04b6c34f896ed9fbad3d2fb706 (patch) | |
| tree | b8b36d1b847d960dfb7bb9d76b4e477b65ebd656 /net/unix/af_unix.c | |
| parent | Linux 6.15-rc1 (diff) | |
| parent | selftest/pidfd: add test for thread-group leader pidfd open for thread (diff) | |
| download | kernel-1e940fff94374d04b6c34f896ed9fbad3d2fb706.tar.gz kernel-1e940fff94374d04b6c34f896ed9fbad3d2fb706.zip | |
Merge patch series "pidfd: improve uapi when task isn't found"
Christian Brauner <[email protected]> says:
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] where they
expect ESRCH to be reported, not EINVAL. I think that's a very resonable
assumption.
This patch tries to allow userspace to distinguish between (1) and (2).
This is racy of course but that shouldn't matter.
* patches from https://lore.kernel.org/r/[email protected]:
selftest/pidfd: add test for thread-group leader pidfd open for thread
pidfd: improve uapi when task isn't found
pidfd: remove unneeded NULL check from pidfd_prepare()
selftests/pidfd: adapt to recent changes
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
