]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/user.c
Merge branch 'master' into csb1725
[mv-sheeva.git] / kernel / user.c
index 7e72614b736d82dd108d99ab79daefa55e6cdfe3..5c598ca781df4bf6f907043ed1d43f98b3b7ef58 100644 (file)
@@ -91,6 +91,7 @@ static struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent)
  * upon function exit.
  */
 static void free_user(struct user_struct *up, unsigned long flags)
+       __releases(&uidhash_lock)
 {
        uid_hash_remove(up);
        spin_unlock_irqrestore(&uidhash_lock, flags);
@@ -157,6 +158,7 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
                spin_lock_irq(&uidhash_lock);
                up = uid_hash_find(uid, hashent);
                if (up) {
+                       put_user_ns(ns);
                        key_put(new->uid_keyring);
                        key_put(new->session_keyring);
                        kmem_cache_free(uid_cachep, new);