Commit 9d9f6e8b authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] RLIM: add mq_bytes to user_struct

Add mq_bytes 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 faaa0feb
......@@ -315,6 +315,8 @@ struct user_struct {
atomic_t processes; /* How many processes 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? */
/* protected by mq_lock */
unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
/* Hash table maintenance information */
struct list_head uidhash_list;
......
......@@ -32,6 +32,7 @@ struct user_struct root_user = {
.processes = ATOMIC_INIT(1),
.files = ATOMIC_INIT(0),
.sigpending = ATOMIC_INIT(0),
.mq_bytes = 0
};
/*
......@@ -111,6 +112,8 @@ struct user_struct * alloc_uid(uid_t uid)
atomic_set(&new->files, 0);
atomic_set(&new->sigpending, 0);
new->mq_bytes = 0;
/*
* Before adding this, check whether we raced
* on adding the same user already..
......
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