[Devel] [PATCH RHEL7 COMMIT] ve/devmptfs: Use current_user_ns_initial() in dev_mount()
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Oct 7 03:54:24 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.8.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.3
------>
commit 96bfd9a8802f1533094f5ec3ec99998b4a35316b
Author: Kirill Tkhai <ktkhai at odin.com>
Date: Wed Oct 7 14:54:24 2015 +0400
ve/devmptfs: Use current_user_ns_initial() in dev_mount()
Use the helper instead of hardcoded check.
Suggested-by: Vladimir Davydov <vdavydov at odin.com>
Signed-off-by: Kirill Tkhai <ktkhai at odin.com>
---
drivers/base/devtmpfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 9f3809c..92840a0 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -105,7 +105,7 @@ static struct dentry *ve_dev_mount(struct file_system_type *fs_type, int flags,
static struct dentry *dev_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
- if (get_exec_env()->init_cred->user_ns != current_user_ns())
+ if (!current_user_ns_initial())
return ERR_PTR(-EPERM);
#ifdef CONFIG_VE
More information about the Devel
mailing list