Re: [RFC PATCH v3 3/8] mm/gup: split follow_page_pte_commit() out of follow_page_pte()
From: Rik van Riel
Date: Sat Aug 22 2026 - 09:20:27 EST
On Fri, 2026-08-21 at 15:04 -0700, John Hubbard wrote:
>
> You have delved too deep, and now uncovered something that's been
> a problem for the whole time. :)
>
> Specifically, "no, GUP should not be setting folios nor pages
> dirty", because that generally needs to be done as part of a
> filesystem
> coordinated set of steps. If the page is dirty, and the filesystem
> didn't expect it to be, that leads to problems.
>
> This is part of the big, remaining set of required fixes, that
> launched the creation of pin_user_pages*() and related. Connecting
> up the filesystems properly is yet to be done. And until then, this
> is a real defect.
>
Not just filesystems.
I found about two dozen places where drivers
fail to mark a page dirty after writing to
it, after obtaining the page from GUP.
I'll get out patches for that, unless there's
some reason I shouldn't.
--
All Rights Reversed.