diff options
Diffstat (limited to 'kernel/user.c')
| -rw-r--r-- | kernel/user.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/user.c b/kernel/user.c index 9a20acce460d..36288d840675 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
| @@ -101,6 +101,7 @@ struct user_struct root_user = { | |||
| 101 | .sigpending = ATOMIC_INIT(0), | 101 | .sigpending = ATOMIC_INIT(0), |
| 102 | .locked_shm = 0, | 102 | .locked_shm = 0, |
| 103 | .uid = GLOBAL_ROOT_UID, | 103 | .uid = GLOBAL_ROOT_UID, |
| 104 | .ratelimit = RATELIMIT_STATE_INIT(root_user.ratelimit, 0, 0), | ||
| 104 | }; | 105 | }; |
| 105 | 106 | ||
| 106 | /* | 107 | /* |
| @@ -191,6 +192,8 @@ struct user_struct *alloc_uid(kuid_t uid) | |||
| 191 | 192 | ||
| 192 | new->uid = uid; | 193 | new->uid = uid; |
| 193 | atomic_set(&new->__count, 1); | 194 | atomic_set(&new->__count, 1); |
| 195 | ratelimit_state_init(&new->ratelimit, HZ, 100); | ||
| 196 | ratelimit_set_flags(&new->ratelimit, RATELIMIT_MSG_ON_RELEASE); | ||
| 194 | 197 | ||
| 195 | /* | 198 | /* |
| 196 | * Before adding this, check whether we raced | 199 | * Before adding this, check whether we raced |
