All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
To: ljs@kernel.org
Cc: akpm@linux-foundation.org, david@kernel.org, harry@kernel.org,
	jannh@google.com, lance.yang@linux.dev, liam@infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	mhocko@suse.com, pfalcato@suse.de, riel@surriel.com,
	rppt@kernel.org, surenb@google.com,
	syzbot+395b7abe9696862fc188@syzkaller.appspotmail.com,
	trintaeoitogc@gmail.com, vbabka@kernel.org, willy@infradead.org
Subject: Re: [PATCH] mm: fix the race on huge alloc failed
Date: Tue,  1 Sep 2026 08:52:48 -0300	[thread overview]
Message-ID: <20260901115248.26650-1-trintaeoitogc@gmail.com> (raw)
In-Reply-To: <apVDMw0d0Y8OZYl0@gremlin>

First, thanks Lorenzo to help me with this...

"Lorenzo Stoakes (ARM)" <ljs@kernel.org> wrote:
> > > > I don't think it's enough to just add a data_race() to this one read of
> > > > vma->anon_vma.  I think it's quite prevalent.  There's probably other
> > > > syzbot reports that mention it.
> >
> > It sounds to me like the most cromulent solution is simply adding a
> >
> > /* maybe vma_has_anon? */
> > static inline bool vma_has_anon_vma(const struct vm_area_struct *vma)
> > {
> > 	return data_race(vma->anon_vma);
> > }
> >
> > and churn everything to use it.
> 
> I'd prefer vma_is_faulted(). That'll align better with my scalable CoW work
> also.
> 
> Anyway I agree with Pedro that a data_race() resolution is appropriate here
> rather than an unnecessary READ_ONCE()/WRITE_ONCE() pair.

Okay, if only a data_race(...) is enough to silently KCSAN, I can send a new
PATCH or send a v2 of this PATCH with this new implementation and with a fix of
commit message


  reply	other threads:[~2026-09-01 11:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 10:00 [PATCH] mm: fix the race on huge alloc failed Guilherme Giacomo Simoes
2026-08-29 15:33 ` Matthew Wilcox
2026-08-29 15:36 ` Matthew Wilcox
2026-08-29 18:02   ` Guilherme Giacomo Simoes
2026-08-30  3:06     ` Lance Yang
2026-08-30  3:34     ` Matthew Wilcox
2026-08-30 12:47       ` Guilherme Giacomo Simoes
2026-08-30 14:07         ` Pedro Falcato
2026-08-31  9:32           ` Lorenzo Stoakes (ARM)
2026-09-01 11:52             ` Guilherme Giacomo Simoes [this message]
2026-09-01 11:48           ` Guilherme Giacomo Simoes

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=20260901115248.26650-1-trintaeoitogc@gmail.com \
    --to=trintaeoitogc@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=harry@kernel.org \
    --cc=jannh@google.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=pfalcato@suse.de \
    --cc=riel@surriel.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=syzbot+395b7abe9696862fc188@syzkaller.appspotmail.com \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.