]> git.baikalelectronics.ru Git - kernel.git/commit
ucounts: Pair inc_rlimit_ucounts with dec_rlimit_ucoutns in commit_creds
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 16 Oct 2021 17:30:00 +0000 (12:30 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 19 Oct 2021 16:01:52 +0000 (11:01 -0500)
commitc8360ba6c7ebafc2b2dcabfb09cd9bf3351a48bd
tree9a748fa28329aaf1eb4ff72bb86e496b0e8f8976
parent2e732fc9892230ac21edfc441c4cb4df197a5aec
ucounts: Pair inc_rlimit_ucounts with dec_rlimit_ucoutns in commit_creds

The purpose of inc_rlimit_ucounts and dec_rlimit_ucounts in commit_creds
is to change which rlimit counter is used to track a process when the
credentials changes.

Use the same test for both to guarantee the tracking is correct.

Cc: stable@vger.kernel.org
Fixes: 96a6f980d813 ("Reimplement RLIMIT_NPROC on top of ucounts")
Link: https://lkml.kernel.org/r/87v91us0w4.fsf_-_@disp2133
Tested-by: Yu Zhao <yuzhao@google.com>
Reviewed-by: Alexey Gladkov <legion@kernel.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/cred.c