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

Submitted by Konstantin Khorenko on June 22, 2017, 2:47 p.m.

Details

Message ID 1498142878-2222-3-git-send-email-khorenko@virtuozzo.com
State New
Series "Revert "ms/cred: Reject inodes with invalid ids in set_create_file_as()""
Headers show

Commit Message

Konstantin Khorenko June 22, 2017, 2:47 p.m.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 fs/proc/root.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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