Commit 84f4d297 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] RLIM: add sigpending field to user_struct

Add sigpending field to user_struct, and make sure it's properly initialized.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 63e9e5dc
...@@ -314,6 +314,7 @@ struct user_struct { ...@@ -314,6 +314,7 @@ struct user_struct {
atomic_t __count; /* reference count */ atomic_t __count; /* reference count */
atomic_t processes; /* How many processes does this user have? */ atomic_t processes; /* How many processes does this user have? */
atomic_t files; /* How many open files does this user have? */ atomic_t files; /* How many open files does this user have? */
atomic_t sigpending; /* How many pending signals does this user have? */
/* Hash table maintenance information */ /* Hash table maintenance information */
struct list_head uidhash_list; struct list_head uidhash_list;
......
...@@ -30,7 +30,8 @@ static spinlock_t uidhash_lock = SPIN_LOCK_UNLOCKED; ...@@ -30,7 +30,8 @@ static spinlock_t uidhash_lock = SPIN_LOCK_UNLOCKED;
struct user_struct root_user = { struct user_struct root_user = {
.__count = ATOMIC_INIT(1), .__count = ATOMIC_INIT(1),
.processes = ATOMIC_INIT(1), .processes = ATOMIC_INIT(1),
.files = ATOMIC_INIT(0) .files = ATOMIC_INIT(0),
.sigpending = ATOMIC_INIT(0),
}; };
/* /*
...@@ -108,6 +109,7 @@ struct user_struct * alloc_uid(uid_t uid) ...@@ -108,6 +109,7 @@ struct user_struct * alloc_uid(uid_t uid)
atomic_set(&new->__count, 1); atomic_set(&new->__count, 1);
atomic_set(&new->processes, 0); atomic_set(&new->processes, 0);
atomic_set(&new->files, 0); atomic_set(&new->files, 0);
atomic_set(&new->sigpending, 0);
/* /*
* Before adding this, check whether we raced * Before adding this, check whether we raced
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment