[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC 22/41] sunrpc: use fc_init_pseudo() for rpc_pipefs
- To: linux-fsdevel@xxxxxxxxxxxxxxx
- From: Christian Brauner <brauner@xxxxxxxxxx>
- Date: Tue, 10 Nov 2026 10:14:38 +0100
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=k20260515 header.d=kernel.org header.i="@kernel.org" header.h="From:Date:Subject:References:In-Reply-To:To:Cc"
- Cc: Jann Horn <jannh@xxxxxxxxxx>, Chris Mason <mason@xxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, driver-core@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, selinux@xxxxxxxxxxxxxxx, apparmor@xxxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, fuse-devel@xxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx, Amir Goldstein <amir73il@xxxxxxxxx>, linux-erofs@xxxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx, "Christian Brauner (Amutable)" <brauner@xxxxxxxxxx>
- Delivery-date: Tue, 10 Nov 2026 09:21:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Initialize rpc_pipefs as a pseudo filesystem. This raises SB_I_PSEUDO and
also SB_I_NOEXEC and SB_I_NODEV. rpc_pipefs never holds executables or
device nodes.
Signed-off-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>
---
net/sunrpc/rpc_pipe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 9d349cfbc483..37277a6d2415 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/mount.h>
#include <linux/fs_context.h>
+#include <linux/pseudo_fs.h>
#include <linux/namei.h>
#include <linux/fsnotify.h>
#include <linux/kernel.h>
@@ -1181,6 +1182,7 @@ static int rpc_init_fs_context(struct fs_context *fc)
{
put_user_ns(fc->user_ns);
fc->user_ns = get_user_ns(fc->net_ns->user_ns);
+ fc_init_pseudo(fc);
fc->ops = &rpc_fs_context_ops;
return 0;
}
--
2.53.0
|