* [merged mm-stable] mm-rmap-sanity-check-that-zeropages-are-not-passed-to-rmap.patch removed from -mm tree
@ 2024-06-25 4:59 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-06-25 4:59 UTC (permalink / raw)
To: mm-commits, vdonnefort, dan.j.williams, david, akpm
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@redhat.com>
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@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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@redhat.com 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-25 4:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 4:59 [merged mm-stable] mm-rmap-sanity-check-that-zeropages-are-not-passed-to-rmap.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.