[Devel] [PATCH rh7 02/11] proc: use proper user_ns for mount

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 22 17:47:49 MSK 2017


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);
 
-- 
1.8.3.1



More information about the Devel mailing list