Re: [BUG] mm/gup: WARNING: mm/page-writeback.c:2678 at __folio_mark_dirty on v7.4-rc3

From: Pedro Falcato

Date: Tue Nov 24 2026 - 08:11:32 EST


On Sat, Nov 21, 2026 at 05:44:34PM +0100, David Hildenbrand (Arm) wrote:
> On 11/21/26 15:49, Yi Wen wrote:
> > Hi,
> >
> > I am reporting a kernel WARNING triggered by a syzkaller reproducer on
> > Linux v7.4-rc3.
> >
> > The reproducer triggers a WARNING in ext4_dirty_folio() when
> > process_vm_writev() writes to a file-backed mapping.
> >
> > The call trace shows that the warning occurs during the GUP page
> > unpinning and dirtying path:
> >
> > process_vm_writev()
> > -> process_vm_rw_core()
> > -> unpin_user_pages_dirty_lock()
> > -> folio_mark_dirty()
> > -> ext4_dirty_folio()
> >
> > A second WARNING is subsequently triggered in __folio_mark_dirty() in
> > mm/page-writeback.c.
> >
> > This appears to be related to the interaction between GUP-based page
> > dirtying and filesystem-managed folio metadata. In particular, the GUP
> > dirtying path may mark a file-backed folio dirty without ensuring that
> > the filesystem-specific metadata required by its dirty_folio()
> > implementation remains available.
> >
> > This may be related to the known issue where GUP-based page dirtying
> > does not properly notify the filesystem through page_mkwrite(), as
> > well as the interaction between GUP dirtying and
> > filemap_release_folio().
> >
> > Before these warnings, all four ext4 loop devices also report delayed
> > block allocation errors and abnormal free block accounting. These
> > errors may indicate an additional filesystem inconsistency and are
> > included in the console log for further investigation.
> >
>
> Hi,
>
> thanks for the report.
>
> Did you only find this through syzcaller or by the help of an LLM?
>
> I'm asking because the timing is interesting; this should be one of the problems
> discussed by:
>
> https://lore.kernel.org/r/20261119-gup-dirty-what-v1-0-236d69f25c24@xxxxxxx
>
> CCing Pedro, John und Jan.

Yep, looks likely to be the same bug.

--
Pedro