From: Oleg Nesterov <oleg@redhat.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Andrei Vagin <avagin@google.com>, Kees Cook <kees@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Alexey Gladkov <legion@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] signal: restore the override_rlimit logic
Date: Mon, 4 Nov 2024 21:42:03 +0100 [thread overview]
Message-ID: <20241104204202.GB26235@redhat.com> (raw)
In-Reply-To: <20241104195419.3962584-1-roman.gushchin@linux.dev>
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@redhat.com>
next prev parent reply other threads:[~2024-11-04 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 19:54 [PATCH v2] signal: restore the override_rlimit logic Roman Gushchin
2024-11-04 20:42 ` Oleg Nesterov [this message]
2024-11-04 21:47 ` Alexey Gladkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104204202.GB26235@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=ebiederm@xmission.com \
--cc=kees@kernel.org \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox