From: Rik van Riel <riel@surriel.com>
To: Yeoreum Yun <yeoreum.yun@arm.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Yuan-Hao Hsu <aa9736195201@gmail.com>
Subject: Re: [PATCH v4 3/6] mm: gup: move gup_must_unshare() and INTERNAL_GUP_FLAGS to gup.c
Date: Wed, 18 Nov 2026 11:59:48 -0500 [thread overview]
Message-ID: <5f26a5a1e72fc999823bfac94f33b3c06465e519.camel@surriel.com> (raw)
In-Reply-To: <20261110-refactor_gup_fast-v4-3-e779a7674274@arm.com>
On Tue, 2026-11-10 at 22:52 +0000, Yeoreum Yun wrote:
>
> +static inline bool gup_must_unshare(struct vm_area_struct *vma,
> + unsigned int flags, struct page
> *page)
> +{
> + /*
> + * FOLL_WRITE is implicitly handled correctly as the page
> table entry
> + * has to be writable -- and if it references (part of) an
> anonymous
> + * folio, that part is required to be marked exclusive.
> + */
> + if ((flags & (FOLL_WRITE | FOLL_PIN)) != FOLL_PIN)
> + return false;
While I was playing around with some AI loop to
automatically improve review-prompts, one of the
AI engines (out of 6 different ones) spotted a
bug with this code, as used in this series.
I have a reproducer to verify it, and will send
in the fix with v6 of my GUP series later this
week.
--
All Rights Reversed.
next prev parent reply other threads:[~2026-11-18 17:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 22:52 [PATCH v4 0/6] mm: gup: batch PTE-mapped large folios in gup_fast_pte_range() Yeoreum Yun
2026-11-10 22:52 ` [PATCH v4 1/6] mm: khugepaged: ignore MADV_HUGEPAGE for shadow stacks Yeoreum Yun
2026-11-10 22:52 ` [PATCH v4 2/6] mm: gup: clarify a reason to check pte/pmd in gup_fast_pte_range() Yeoreum Yun
2026-11-10 22:52 ` [PATCH v4 3/6] mm: gup: move gup_must_unshare() and INTERNAL_GUP_FLAGS to gup.c Yeoreum Yun
2026-11-18 16:59 ` Rik van Riel [this message]
2026-11-18 18:01 ` David Hildenbrand (Arm)
2026-11-10 22:52 ` [PATCH v4 4/6] mm: internal: introduce FPB_LOCKLESS for folio_pte_batch_flags() Yeoreum Yun
2026-11-10 22:52 ` [PATCH v4 5/6] mm: gup: introduce gup_pages_not_requiring_unshare() Yeoreum Yun
2026-11-10 22:52 ` [PATCH v4 6/6] mm: gup: batch PTE-mapped large folios in gup_fast_pte_range() Yeoreum Yun
2026-11-11 7:38 ` [PATCH v4 0/6] " David Hildenbrand
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=5f26a5a1e72fc999823bfac94f33b3c06465e519.camel@surriel.com \
--to=riel@surriel.com \
--cc=aa9736195201@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=peterx@redhat.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=yeoreum.yun@arm.com \
/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
all inboxes | Powered by JetHome®