[Devel] [PATCH RHEL10 COMMIT] fixup! fs: allow init Container user_ns to mount filesystems with FS_VE_MOUNT
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Jun 5 21:32:01 MSK 2026
The commit is pushed to "branch-rh10-6.12.0-55.52.1.5.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.5.29.vz10
------>
commit df3be92e6fa6dd9190706c215acb787d2c69cd5d
Author: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
Date: Tue Jun 2 21:10:26 2026 +0000
fixup! fs: allow init Container user_ns to mount filesystems with FS_VE_MOUNT
get_exec_env() is dereferenced without check.
https://virtuozzo.atlassian.net/browse/VSTOR-130116
Feature: !CONFIG_VE build
Signed-off-by: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
---
fs/super.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/super.c b/fs/super.c
index 2c266c869312f..1adebbf358032 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -770,7 +770,11 @@ struct super_block *sget_fc(struct fs_context *fc,
struct super_block *s = NULL;
struct super_block *old;
struct user_namespace *user_ns = fc->global ? &init_user_ns : fc->user_ns;
+#ifdef CONFIG_VE
struct cred *cred = get_exec_env()->init_cred;
+#else
+ struct cred *cred = &init_cred;
+#endif
int err;
/*
More information about the Devel
mailing list