Merge tag 'ucount-rlimits-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux...
[linux-block.git] / kernel / sys.c
index b911fa6d81ab7a19bc3d40dfb796e361adbbcc8d..8a6432465dc5b287b59f27e8032920df4d23fa2a 100644 (file)
@@ -496,7 +496,7 @@ static void flag_nproc_exceeded(struct cred *new)
         * for programs doing set*uid()+execve() by harmlessly deferring the
         * failure to the execve() stage.
         */
-       if (is_ucounts_overlimit(new->ucounts, UCOUNT_RLIMIT_NPROC, rlimit(RLIMIT_NPROC)) &&
+       if (is_rlimit_overlimit(new->ucounts, UCOUNT_RLIMIT_NPROC, rlimit(RLIMIT_NPROC)) &&
                        new->user != INIT_USER)
                current->flags |= PF_NPROC_EXCEEDED;
        else