diff options
Diffstat (limited to 'kernel/user.c')
| -rw-r--r-- | kernel/user.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/kernel/user.c b/kernel/user.c index 766467b3bcb7..7e72614b736d 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/user_namespace.h> | 18 | #include <linux/user_namespace.h> |
| 19 | #include "cred-internals.h" | ||
| 20 | 19 | ||
| 21 | struct user_namespace init_user_ns = { | 20 | struct user_namespace init_user_ns = { |
| 22 | .kref = { | 21 | .kref = { |
| @@ -137,9 +136,6 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid) | |||
| 137 | struct hlist_head *hashent = uidhashentry(ns, uid); | 136 | struct hlist_head *hashent = uidhashentry(ns, uid); |
| 138 | struct user_struct *up, *new; | 137 | struct user_struct *up, *new; |
| 139 | 138 | ||
| 140 | /* Make uid_hash_find() + uids_user_create() + uid_hash_insert() | ||
| 141 | * atomic. | ||
| 142 | */ | ||
| 143 | spin_lock_irq(&uidhash_lock); | 139 | spin_lock_irq(&uidhash_lock); |
| 144 | up = uid_hash_find(uid, hashent); | 140 | up = uid_hash_find(uid, hashent); |
| 145 | spin_unlock_irq(&uidhash_lock); | 141 | spin_unlock_irq(&uidhash_lock); |
| @@ -161,11 +157,6 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid) | |||
| 161 | spin_lock_irq(&uidhash_lock); | 157 | spin_lock_irq(&uidhash_lock); |
| 162 | up = uid_hash_find(uid, hashent); | 158 | up = uid_hash_find(uid, hashent); |
| 163 | if (up) { | 159 | if (up) { |
| 164 | /* This case is not possible when CONFIG_USER_SCHED | ||
| 165 | * is defined, since we serialize alloc_uid() using | ||
| 166 | * uids_mutex. Hence no need to call | ||
| 167 | * sched_destroy_user() or remove_user_sysfs_dir(). | ||
| 168 | */ | ||
| 169 | key_put(new->uid_keyring); | 160 | key_put(new->uid_keyring); |
| 170 | key_put(new->session_keyring); | 161 | key_put(new->session_keyring); |
| 171 | kmem_cache_free(uid_cachep, new); | 162 | kmem_cache_free(uid_cachep, new); |
| @@ -178,8 +169,6 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid) | |||
| 178 | 169 | ||
| 179 | return up; | 170 | return up; |
| 180 | 171 | ||
| 181 | put_user_ns(new->user_ns); | ||
| 182 | kmem_cache_free(uid_cachep, new); | ||
| 183 | out_unlock: | 172 | out_unlock: |
| 184 | return NULL; | 173 | return NULL; |
| 185 | } | 174 | } |
