[Devel] [PATCH RHEL COMMIT] ve/kernfs: fix lookup for kernfs superblock

Konstantin Khorenko khorenko at virtuozzo.com
Mon Oct 4 20:39:03 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit 9100dc419578ef5afa83cd03480922f248ad8a45
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Mon Oct 4 20:39:03 2021 +0300

    ve/kernfs: fix lookup for kernfs superblock
    
    sysfs (kernfs) mount looks up for already existing superblock,
    but uses non-inited kernfs_super_info->ve field for comparison.
    
    Fill the ve field before existing superblock lookup.
    
    https://jira.sw.ru/browse/PSBM-85052
    https://jira.sw.ru/browse/PSBM-103433
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
    
    [VvS RHEL7.8 rebase] context changes
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
    
    (cherry picked from vz8 commit 1fbfb821a1d844ec06f88f5e38c5cb6237cad66f)
    Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 fs/kernfs/mount.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index fd0ae3b16bcf..a09515ec797c 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -327,6 +327,7 @@ int kernfs_get_tree(struct fs_context *fc)
 	info->root = kfc->root;
 	info->ns = kfc->ns_tag;
 	INIT_LIST_HEAD(&info->node);
+	info->ve = get_exec_env();
 
 	fc->s_fs_info = info;
 	sb = sget_fc(fc, kernfs_test_super, kernfs_set_super);


More information about the Devel mailing list