[Devel] [PATCH RHEL7 COMMIT] proc: use proper user_ns for mount

Konstantin Khorenko khorenko at virtuozzo.com
Tue Jul 11 18:39:36 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.3
------>
commit 81e2809b9dcb3e4370db3451891385ae1055a181
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Tue Jul 11 19:39:36 2017 +0400

    proc: use proper user_ns for mount
    
    https://jira.sw.ru/browse/PSBM-40075
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/proc/root.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/proc/root.c b/fs/proc/root.c
index eb4efc2..402e6d6 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -125,7 +125,8 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
 			return ERR_PTR(-EPERM);
 	}
 
-	sb = sget(fs_type, proc_test_super, proc_set_super, flags, ns);
+	sb = sget_userns(fs_type, proc_test_super, proc_set_super, flags,
+			 ns->user_ns, ns);
 	if (IS_ERR(sb))
 		return ERR_CAST(sb);
 


More information about the Devel mailing list