Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95286
b: refs/heads/master
c: 354a1f4
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Apr 30, 2008
1 parent 447707f commit 292e110
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 487798df6d25e76ed6558b3e17c44cf0458cc6f3
refs/heads/master: 354a1f4d99240f53980275416ca3e1ac2ee73d5d
18 changes: 2 additions & 16 deletions trunk/kernel/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void free_uid(struct user_struct *up)
local_irq_restore(flags);
}

struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid)
struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
{
struct hlist_head *hashent = uidhashentry(ns, uid);
struct user_struct *up, *new;
Expand All @@ -399,26 +399,12 @@ struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid)
spin_unlock_irq(&uidhash_lock);

if (!up) {
new = kmem_cache_alloc(uid_cachep, GFP_KERNEL);
new = kmem_cache_zalloc(uid_cachep, GFP_KERNEL);
if (!new)
goto out_unlock;

new->uid = uid;
atomic_set(&new->__count, 1);
atomic_set(&new->processes, 0);
atomic_set(&new->files, 0);
atomic_set(&new->sigpending, 0);
#ifdef CONFIG_INOTIFY_USER
atomic_set(&new->inotify_watches, 0);
atomic_set(&new->inotify_devs, 0);
#endif
#ifdef CONFIG_POSIX_MQUEUE
new->mq_bytes = 0;
#endif
new->locked_shm = 0;
#ifdef CONFIG_KEYS
new->uid_keyring = new->session_keyring = NULL;
#endif

if (sched_create_user(new) < 0)
goto out_free_user;
Expand Down

0 comments on commit 292e110

Please sign in to comment.