Skip to content

Commit 819af73

Browse files
committed
pidfs: move O_RDWR into pidfs_alloc_file()
JIRA: https://issues.redhat.com/browse/RHEL-107520 Conflicts: A merge conflict due to missing upstream commit a71f402 ("pidfs: get rid of __pidfd_prepare()") and related ones. commit c57f07b Author: Christian Brauner <brauner@kernel.org> Date: Mon, 14 Apr 2025 15:55:05 +0200 pidfs: move O_RDWR into pidfs_alloc_file() Since all pidfds must be O_RDWR currently enfore that directly in the file allocation function itself instead of letting callers specify it. Link: https://lore.kernel.org/20250414-work-coredump-v2-1-685bf231f828@kernel.org Tested-by: Luca Boccassi <luca.boccassi@gmail.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Waiman Long <longman@redhat.com>
1 parent dbfeea5 commit 819af73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/pidfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ struct file *pidfs_alloc_file(struct pid *pid, unsigned int flags)
708708
if (ret < 0)
709709
return ERR_PTR(ret);
710710

711+
flags |= O_RDWR;
711712
pidfd_file = dentry_open(&path, flags, current_cred());
712713
path_put(&path);
713714
return pidfd_file;

0 commit comments

Comments
 (0)