[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28a5b824-f415-461c-af88-cb474ed37df1@kernel.org>
Date: Mon, 3 Nov 2025 18:08:01 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Kalesh Singh <kaleshsingh@...gle.com>, akpm@...ux-foundation.org,
minchan@...nel.org, lorenzo.stoakes@...cle.com, david@...hat.com,
Liam.Howlett@...cle.com, rppt@...nel.org, pfalcato@...e.de
Cc: rostedt@...dmis.org, hughd@...gle.com, kernel-team@...roid.com,
android-mm@...gle.com, Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Kees Cook <kees@...nel.org>, Vlastimil Babka <vbabka@...e.cz>,
Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
Jann Horn <jannh@...gle.com>, Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>, Ben Segall
<bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>, Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-trace-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v4 1/5] mm: Document lenient map_count checks
On 28.10.25 22:24, Kalesh Singh wrote:
> Add comments to the map_count limit checks in do_mmap() and
> do_brk_flags() to clarify their intended behavior.
>
> The use of a strict inequality ('>') in these checks is intentional but
> non-obvious. It allows these functions to succeed when the VMA count is
> exactly at the sysctl_max_map_count limit. This historical behavior
> accounts for cases where the operation might not create a new VMA, but
> instead merge with or expand an existing one, in which case the VMA
> count does not increase.
>
> These comments clarify the long-standing behavior and will help prevent
> future misinterpretation as an off-by-one error.
>
> Signed-off-by: Kalesh Singh <kaleshsingh@...gle.com>
> ---
Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>
--
Cheers
David
Powered by blists - more mailing lists