diff options
-rw-r--r-- | include/linux/sched.h | 2 | ||||
-rw-r--r-- | kernel/user.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 57166582a3f5..884699fa8c1f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -518,8 +518,10 @@ struct user_struct { | |||
518 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ | 518 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ |
519 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ | 519 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ |
520 | #endif | 520 | #endif |
521 | #ifdef CONFIG_POSIX_MQUEUE | ||
521 | /* protected by mq_lock */ | 522 | /* protected by mq_lock */ |
522 | unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ | 523 | unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ |
524 | #endif | ||
523 | unsigned long locked_shm; /* How many pages of mlocked shm ? */ | 525 | unsigned long locked_shm; /* How many pages of mlocked shm ? */ |
524 | 526 | ||
525 | #ifdef CONFIG_KEYS | 527 | #ifdef CONFIG_KEYS |
diff --git a/kernel/user.c b/kernel/user.c index f42a68e008fd..9cb6f6403561 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -44,7 +44,6 @@ struct user_struct root_user = { | |||
44 | .processes = ATOMIC_INIT(1), | 44 | .processes = ATOMIC_INIT(1), |
45 | .files = ATOMIC_INIT(0), | 45 | .files = ATOMIC_INIT(0), |
46 | .sigpending = ATOMIC_INIT(0), | 46 | .sigpending = ATOMIC_INIT(0), |
47 | .mq_bytes = 0, | ||
48 | .locked_shm = 0, | 47 | .locked_shm = 0, |
49 | #ifdef CONFIG_KEYS | 48 | #ifdef CONFIG_KEYS |
50 | .uid_keyring = &root_user_keyring, | 49 | .uid_keyring = &root_user_keyring, |
@@ -341,8 +340,9 @@ struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid) | |||
341 | atomic_set(&new->inotify_watches, 0); | 340 | atomic_set(&new->inotify_watches, 0); |
342 | atomic_set(&new->inotify_devs, 0); | 341 | atomic_set(&new->inotify_devs, 0); |
343 | #endif | 342 | #endif |
344 | 343 | #ifdef CONFIG_POSIX_MQUEUE | |
345 | new->mq_bytes = 0; | 344 | new->mq_bytes = 0; |
345 | #endif | ||
346 | new->locked_shm = 0; | 346 | new->locked_shm = 0; |
347 | 347 | ||
348 | if (alloc_uid_keyring(new, current) < 0) { | 348 | if (alloc_uid_keyring(new, current) < 0) { |