[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87czs4u0rm.fsf@disp2133>
Date: Tue, 29 Jun 2021 10:51:57 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Alexey Gladkov <legion@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Containers <containers@...ts.linux.dev>
Subject: Re: [GIT PULL] ucounts: Count rlimits in each user namespace
Linus Torvalds <torvalds@...ux-foundation.org> writes:
> Why the "sigpending < LONG_MAX" test in that
>
> if (override_rlimit || (sigpending < LONG_MAX && sigpending <=
> task_rlimit(t, RLIMIT_SIGPENDING))) {
> thing?
On second look that sigpending < LONG_MAX check is necessary. When
inc_rlimit_ucounts detects a problem it returns LONG_MAX.
So the check for LONG_MAX is the condensed check to see if there is a
problem in any other levels of the ucount hierarchy.
Eric
Powered by blists - more mailing lists