The quilt patch titled Subject: mm/rmap: sanity check that zeropages are not passed to RMAP has been removed from the -mm tree. Its filename was mm-rmap-sanity-check-that-zeropages-are-not-passed-to-rmap.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: David Hildenbrand <david@xxxxxxxxxx> Subject: mm/rmap: sanity check that zeropages are not passed to RMAP Date: Wed, 22 May 2024 14:57:13 +0200 Using insert_page() we might have previously ended up passing the zeropage into rmap code. Make sure that won't happen again. Note that we won't check the huge zeropage for now, which might still end up in RMAP code. Link: https://lkml.kernel.org/r/20240522125713.775114-4-david@xxxxxxxxxx Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Vincent Donnefort <vdonnefort@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/rmap.h | 3 +++ 1 file changed, 3 insertions(+) --- a/include/linux/rmap.h~mm-rmap-sanity-check-that-zeropages-are-not-passed-to-rmap +++ a/include/linux/rmap.h @@ -200,6 +200,9 @@ static inline void __folio_rmap_sanity_c /* hugetlb folios are handled separately. */ VM_WARN_ON_FOLIO(folio_test_hugetlb(folio), folio); + /* When (un)mapping zeropages, we should never touch ref+mapcount. */ + VM_WARN_ON_FOLIO(is_zero_folio(folio), folio); + /* * TODO: we get driver-allocated folios that have nothing to do with * the rmap using vm_insert_page(); therefore, we cannot assume that _ Patches currently in -mm which might be from david@xxxxxxxxxx are mm-pass-meminit_context-to-__free_pages_core.patch mm-pass-meminit_context-to-__free_pages_core-fix.patch mm-pass-meminit_context-to-__free_pages_core-fix-2.patch mm-pass-meminit_context-to-__free_pages_core-fix-3.patch mm-memory_hotplug-initialize-memmap-of-zone_device-with-pageoffline-instead-of-pagereserved.patch mm-memory_hotplug-skip-adjust_managed_page_count-for-pageoffline-pages-when-offlining.patch mm-read-page_type-using-read_once.patch mm-migrate-make-migrate_misplaced_folio-return-0-on-success.patch mm-migrate-move-numa-hinting-fault-folio-isolation-checks-under-ptl.patch