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

Andrey Ryabinin aryabinin at virtuozzo.com
Wed May 27 16:45:55 MSK 2020


From: Konstantin Khorenko <khorenko at virtuozzo.com>

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>
---
 fs/kernfs/mount.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index f1c2335b8534..f339a037f90e 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -321,6 +321,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags,
 	info->root = root;
 	info->ns = ns;
 	INIT_LIST_HEAD(&info->node);
+	info->ve = get_exec_env();
 
 	sb = sget_userns(fs_type, kernfs_test_super, kernfs_set_super, flags,
 			 &init_user_ns, info);
-- 
2.26.2



More information about the Devel mailing list