diff options
author | Christian Brauner <brauner@kernel.org> | 2023-03-27 14:46:01 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-03-27 15:27:25 +0200 |
commit | a79cc966a608c65d37d4118b59df5f888cbd5b27 (patch) | |
tree | f3d489b5411a47a8eb0b473b65cf666234a9a750 | |
parent | bc286bae683c09f73fd9ea14f72fc7009dbdfd34 (diff) | |
download | linux-b4/pidfd-file-api.tar.gz |
pidfd: add pidfd_prepare()b4/pidfd-file-api
This adds the pidfd_prepare() helper which allows the caller to reserve
a pidfd number and allocates a new pidfd file that stashes the provided
struct pid.
This will allow us to remove places that either open code this
functionality e.g., during copy_process() or that currently call
pidfd_create() but then have to call close_fd() because there are still
failure points after pidfd_create() has been called.
Other functionality wants to make use of pidfd's as well and they need a
pidfd_prepare() internal api as well.
I've tested the fanotify and fork changes via LTP which provides
coverage for all the affected codepaths.
Cc: Jan Kara <jack@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Matthew Bobrowski <repnop@google.com>
Cc: linux-kernel@vger.kernel.org
To: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
"series": {
"revision": 1,
"change-id": "20230327-pidfd-file-api-8b28d68cf0a9",
"base-branch": "master.v6.3-rc4",
"prefixes": []
}
}
0 files changed, 0 insertions, 0 deletions