[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241104204202.GB26235@redhat.com>
Date: Mon, 4 Nov 2024 21:42:03 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Roman Gushchin <roman.gushchin@...ux.dev>
Cc: linux-kernel@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
Andrei Vagin <avagin@...gle.com>, Kees Cook <kees@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Alexey Gladkov <legion@...nel.org>, stable@...r.kernel.org
Subject: Re: [PATCH v2] signal: restore the override_rlimit logic
On 11/04, Roman Gushchin wrote:
>
> -long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type)
> +long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
> + bool override_rlimit)
> {
> /* Caller must hold a reference to ucounts */
> struct ucounts *iter;
> @@ -320,7 +321,8 @@ long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type)
> goto unwind;
> if (iter == ucounts)
> ret = new;
> - max = get_userns_rlimit_max(iter->ns, type);
> + if (!override_rlimit)
> + max = get_userns_rlimit_max(iter->ns, type);
> /*
> * Grab an extra ucount reference for the caller when
> * the rlimit count was previously 0.
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists