[RHEL8,COMMIT] ve/kernfs: fix lookup for kernfs superblock

Submitted by Konstantin Khorenko on May 28, 2020, 9:51 a.m.


Message ID 202005280951.04S9ppgE024048@finist_co8.work.ct
State New
Series "ve/kernfs: fix lookup for kernfs superblock"
Headers show

Commit Message

Konstantin Khorenko May 28, 2020, 9:51 a.m.
The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.3.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.3.9
commit 2c72cdede19d7b71af8a99afe4ec4fa4385be6be
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Thu May 28 12:51:50 2020 +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.
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
    [VvS RHEL7.8 rebase] context changes
    Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
 fs/kernfs/mount.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

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;
+	info->ve = get_exec_env();
 	sb = sget_userns(fs_type, kernfs_test_super, kernfs_set_super, flags,
 			 &init_user_ns, info);