Re: [PATCH v2] ext4: check folio uptodate state in ext4_page_mkwrite()

From: Matthew Wilcox

Date: Wed Dec 03 2025 - 16:54:57 EST


On Wed, Dec 03, 2025 at 10:46:57AM -0500, Theodore Tso wrote:
> Matthew, as the page cache maintainer, do we actually need this extra
> rigamarole. Or can we just skip taking the lock before checking to
> see if the folio is uptodate in ext4_page_mkwrite()?

Oh, this triggered a memory. Looks like you missed my reply in that
thread. This patch is bogus. You need to prevent !uptodate folios from
being referenced by the page tables.

https://groups.google.com/g/syzkaller-bugs/c/kjaCOwdrWVg/m/6Li1dROPBQAJ