Unverified Commit 4af033da authored by Christian Brauner's avatar Christian Brauner
Browse files

nsfs: raise SB_I_NODEV and SB_I_NOEXEC

There's zero need for nsfs to allow device nodes or execution.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-5-2e6f823ebdc0@kernel.org


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent b21cba8d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -591,6 +591,7 @@ static int nsfs_init_fs_context(struct fs_context *fc)
	struct pseudo_fs_context *ctx = init_pseudo(fc, NSFS_MAGIC);
	if (!ctx)
		return -ENOMEM;
	fc->s_iflags |= SB_I_NOEXEC | SB_I_NODEV;
	ctx->s_d_flags |= DCACHE_DONTCACHE;
	ctx->ops = &nsfs_ops;
	ctx->eops = &nsfs_export_operations;