linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pedro Falcato <pfalcato@suse.de>
To: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 "Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	 Michal Hocko <mhocko@suse.com>, Jann Horn <jannh@google.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	Jianzhou Zhao <luckd0g@163.com>,
	 Oscar Salvador <osalvador@suse.de>
Subject: Re: [PATCH 2/3] mm: abstract reading sysctl_max_map_count, and READ_ONCE()
Date: Fri, 27 Mar 2026 09:20:17 +0000	[thread overview]
Message-ID: <357u5es4z7jjnpkyefubvlygpkcinqomnyg233ra6geeamq35y@fuor6y4es3cp> (raw)
In-Reply-To: <0715259eb37cbdfde4f9e5db92a20ec7110a1ce5.1773249037.git.ljs@kernel.org>

On Wed, Mar 11, 2026 at 05:24:37PM +0000, Lorenzo Stoakes (Oracle) wrote:
> Concurrent reads and writes of sysctl_max_map_count are possible, so we
> should READ_ONCE() and WRITE_ONCE().
> 
> The sysctl procfs logic already enforces WRITE_ONCE(), so abstract the read
> side with get_sysctl_max_map_count().
> 
> While we're here, also move the field to mm/internal.h and add the getter
> there since only mm interacts with it, there's no need for anybody else to
> have access.
> 
> Finally, update the VMA userland tests to reflect the change.
> 
> Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>

Reviewed-by: Pedro Falcato <pfalcato@suse.de>

-- 
Pedro


  reply	other threads:[~2026-03-27  9:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 17:24 [PATCH 0/3] mm: improve map count checks Lorenzo Stoakes (Oracle)
2026-03-11 17:24 ` [PATCH 1/3] mm/mremap: correct invalid map count check Lorenzo Stoakes (Oracle)
2026-03-27  9:19   ` Pedro Falcato
2026-03-11 17:24 ` [PATCH 2/3] mm: abstract reading sysctl_max_map_count, and READ_ONCE() Lorenzo Stoakes (Oracle)
2026-03-27  9:20   ` Pedro Falcato [this message]
2026-03-11 17:24 ` [PATCH 3/3] mm/mremap: check map count under mmap write lock and abstract Lorenzo Stoakes (Oracle)
2026-03-27  9:22   ` Pedro Falcato
2026-03-27  9:58     ` Lorenzo Stoakes (Oracle)
2026-03-27  5:42 ` [PATCH 0/3] mm: improve map count checks Andrew Morton
2026-03-27  9:23   ` Pedro Falcato

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=357u5es4z7jjnpkyefubvlygpkcinqomnyg233ra6geeamq35y@fuor6y4es3cp \
    --to=pfalcato@suse.de \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=luckd0g@163.com \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@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