diff options
| author | Rob Herring <robh@kernel.org> | 2018-03-08 10:21:07 -0500 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2018-03-08 10:21:07 -0500 |
| commit | c679fa6e3aaa5c58fc514b5b88cfa82774b8d390 (patch) | |
| tree | 0c10b339368bd1795152a66a4e245e6f654fb3ec /kernel/user.c | |
| parent | bdb7013df910681f84eff27b07791d4c160cb76f (diff) | |
| parent | 4fd98e374fd377ae0458a9dc44aa779cf9631ddd (diff) | |
Merge branch 'dtc-update' into dt/next
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 |
