On Tue, Nov 10, 2026, at 4:14 AM, Christian Brauner wrote: > Initialize the nfsd filesystem as a pseudo filesystem. This raises > SB_I_PSEUDO and also SB_I_NOEXEC and SB_I_NODEV. It never holds > executables or device nodes. > > Signed-off-by: Christian Brauner (Amutable) <[email protected]> > --- > fs/nfsd/nfsctl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > index f32311f2d7cf..ce2666deddbd 100644 > --- a/fs/nfsd/nfsctl.c > +++ b/fs/nfsd/nfsctl.c > @@ -9,6 +9,7 @@ > #include <linux/namei.h> > #include <linux/ctype.h> > #include <linux/fs_context.h> > +#include <linux/pseudo_fs.h> > > #include <linux/sunrpc/cache.h> > #include <linux/sunrpc/svcsock.h> > @@ -1375,6 +1376,7 @@ static int nfsd_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 = &nfsd_fs_context_ops; > return 0; > } > > -- > 2.53.0 Acked-by: Chuck Lever <[email protected]> -- Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)
- [PATCH RFC 29/41] s390/hypfs: use fc_init_pseudo() Christian Brauner
- [PATCH RFC 35/41] zloop: refuse zone files on pseudo... Christian Brauner
- Re: [PATCH RFC 35/41] zloop: refuse zone files ... Alexander Mikhalitsyn
- [PATCH RFC 27/41] openpromfs: use fc_init_pseudo() Christian Brauner
- [PATCH RFC 19/41] smack: use fc_init_pseudo() for sm... Christian Brauner
- Re: [apparmor] [PATCH RFC 19/41] smack: use fc_... Casey Schaufler
- Re: [PATCH RFC 19/41] smack: use fc_init_pseudo... Alexander Mikhalitsyn
- [PATCH RFC 22/41] sunrpc: use fc_init_pseudo() for r... Christian Brauner
- Re: [PATCH RFC 22/41] sunrpc: use fc_init_pseud... Alexander Mikhalitsyn
- [PATCH RFC 21/41] nfsd: use fc_init_pseudo() Christian Brauner
- Re: [PATCH RFC 21/41] nfsd: use fc_init_pseudo(... Chuck Lever
- [PATCH RFC 20/41] apparmor: use fc_init_pseudo() for... Christian Brauner
- Re: [PATCH RFC 20/41] apparmor: use fc_init_pse... Alexander Mikhalitsyn
- [PATCH RFC 39/41] usb: gadget: f_mass_storage: refus... Christian Brauner
- Re: [PATCH RFC 39/41] usb: gadget: f_mass_stora... Alexander Mikhalitsyn
- [PATCH RFC 38/41] fuse: refuse files on pseudo files... Christian Brauner
- Re: [PATCH RFC 38/41] fuse: refuse files on pse... Amir Goldstein
- Re: [PATCH RFC 38/41] fuse: refuse files on pse... Christoph Hellwig
- Re: [PATCH RFC 38/41] fuse: refuse files on... Alexander Mikhalitsyn
- Re: [PATCH RFC 38/41] fuse: refuse file... Amir Goldstein
- [PATCH RFC 23/41] fuse: use fc_init_pseudo() for fus... Christian Brauner
