diff options
Diffstat (limited to 'kernel/user_namespace.c')
-rw-r--r-- | kernel/user_namespace.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index e216e1e8ce84..898e973bd1e8 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c | |||
@@ -27,7 +27,6 @@ int create_user_ns(struct cred *new) | |||
27 | { | 27 | { |
28 | struct user_namespace *ns, *parent_ns = new->user_ns; | 28 | struct user_namespace *ns, *parent_ns = new->user_ns; |
29 | struct user_struct *root_user; | 29 | struct user_struct *root_user; |
30 | int n; | ||
31 | 30 | ||
32 | ns = kmem_cache_alloc(user_ns_cachep, GFP_KERNEL); | 31 | ns = kmem_cache_alloc(user_ns_cachep, GFP_KERNEL); |
33 | if (!ns) | 32 | if (!ns) |
@@ -35,11 +34,8 @@ int create_user_ns(struct cred *new) | |||
35 | 34 | ||
36 | kref_init(&ns->kref); | 35 | kref_init(&ns->kref); |
37 | 36 | ||
38 | for (n = 0; n < UIDHASH_SZ; ++n) | ||
39 | INIT_HLIST_HEAD(ns->uidhash_table + n); | ||
40 | |||
41 | /* Alloc new root user. */ | 37 | /* Alloc new root user. */ |
42 | root_user = alloc_uid(ns, 0); | 38 | root_user = alloc_uid(make_kuid(ns, 0)); |
43 | if (!root_user) { | 39 | if (!root_user) { |
44 | kmem_cache_free(user_ns_cachep, ns); | 40 | kmem_cache_free(user_ns_cachep, ns); |
45 | return -ENOMEM; | 41 | return -ENOMEM; |