diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 877fe4f8e05e..9814e43fb23b 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -571,8 +571,7 @@ static int set_user(struct cred *new) | |||
571 | if (!new_user) | 571 | if (!new_user) |
572 | return -EAGAIN; | 572 | return -EAGAIN; |
573 | 573 | ||
574 | if (atomic_read(&new_user->processes) >= | 574 | if (atomic_read(&new_user->processes) >= rlimit(RLIMIT_NPROC) && |
575 | current->signal->rlim[RLIMIT_NPROC].rlim_cur && | ||
576 | new_user != INIT_USER) { | 575 | new_user != INIT_USER) { |
577 | free_uid(new_user); | 576 | free_uid(new_user); |
578 | return -EAGAIN; | 577 | return -EAGAIN; |