|
@@ -101,6 +101,7 @@ struct user_struct root_user = {
|
|
|
.sigpending = ATOMIC_INIT(0),
|
|
|
.locked_shm = 0,
|
|
|
.uid = GLOBAL_ROOT_UID,
|
|
|
+ .ratelimit = RATELIMIT_STATE_INIT(root_user.ratelimit, 0, 0),
|
|
|
};
|
|
|
|
|
|
/*
|
|
@@ -191,6 +192,8 @@ struct user_struct *alloc_uid(kuid_t uid)
|
|
|
|
|
|
new->uid = uid;
|
|
|
atomic_set(&new->__count, 1);
|
|
|
+ ratelimit_state_init(&new->ratelimit, HZ, 100);
|
|
|
+ ratelimit_set_flags(&new->ratelimit, RATELIMIT_MSG_ON_RELEASE);
|
|
|
|
|
|
/*
|
|
|
* Before adding this, check whether we raced
|