[Devel] [PATCH RHEL10 COMMIT] fixup! ve/fs/nfs: NFS containerization

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 5 21:31:59 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 1439bc5508b07fc413b10b3055460e5664fd8108
Author: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
Date:   Tue Jun 2 21:10:23 2026 +0000

    fixup! ve/fs/nfs: NFS containerization
    
    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/nfs/fs_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index 25c3162565d8a..23ee2be3dc6c3 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -1592,7 +1592,7 @@ static int nfs_init_fs_context(struct fs_context *fc)
 {
 	struct nfs_fs_context *ctx;
 
-	if (!(get_exec_env()->features & VE_FEATURE_NFS))
+	if (!(get_exec_env() && get_exec_env()->features & VE_FEATURE_NFS))
 		return -ENODEV;
 
 	ctx = kzalloc(sizeof(struct nfs_fs_context), GFP_KERNEL);


More information about the Devel mailing list