[PATCH 0/2] mm: memfd_luo: fixes for folio flag preservation
From: Pratyush Yadav
Date: Mon Feb 23 2026 - 12:43:27 EST
From: "Pratyush Yadav (Google)" <pratyush@xxxxxxxxxx>
Hi,
This series contains a couple fixes for flag preservation for memfd live
update.
The first patch fixes memfd preservation when fallocate() was used to
pre-allocate some pages. For these memfds, all the writes to fallocated
pages touched after preserve were lost.
The second patch fixes dirty flag tracking. If the dirty flag is not
tracked correctly, the next kernel might incorrectly reclaim some folios
under memory pressure, losing user data. This is a theoretical bug that
I observed when reading the code, and haven't been able to reproduce it.
Regards,
Pratyush Yadav
Pratyush Yadav (Google) (2):
mm: memfd_luo: always make all folios uptodate
mm: memfd_luo: always dirty all folios
mm/memfd_luo.c | 49 +++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 43 insertions(+), 6 deletions(-)
base-commit: 8bf22c33e7a172fbc72464f4cc484d23a6b412ba
--
2.53.0.371.g1d285c8824-goog