Skip to contentSkip to conversation

alloc_tag-mark-pages-reserved-during-cma-activation-as-not-tagged.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Aug 16, 2024 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: alloc_tag: mark pages reserved during CMA activation as not tagged
has been removed from the -mm tree. Its filename was
alloc_tag-mark-pages-reserved-during-cma-activation-as-not-tagged.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Suren Baghdasaryan <[email protected]>
Subject: alloc_tag: mark pages reserved during CMA activation as not tagged
Date: Tue, 13 Aug 2024 08:07:57 -0700

During CMA activation, pages in CMA area are prepared and then freed without being allocated. This triggers warnings when memory allocation debug config (CONFIG_MEM_ALLOC_PROFILING_DEBUG) is enabled. Fix this by marking these pages not tagged before freeing them.

Fixes d224eb0287fb ("codetag: debug: mark codetags for reserved pages as empty")
Cc Kees Cook <[email protected]>
Cc Kent Overstreet <[email protected]>
Cc Pasha Tatashin <[email protected]>
Cc Sourav Panda <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc <[email protected]> [6.10]

---

 mm/mm_init.c |    2 ++
 1 file changed, 2 insertions(+)
mm/mm_init.c renamed from mm/mm_init.c~alloc_tag-mark-pages-reserved-during-cma-activation-as-not-tagged +2 -0
@@ -2244,6 +2244,8 @@ void __init init_cma_reserved_pageblock(
 
 	set_pageblock_migratetype(page, MIGRATE_CMA);
 	set_page_refcounted(page);
+	/* pages were reserved and not allocated */
+	clear_page_tag_ref(page);
 	__free_pages(page, pageblock_order);
 
 	adjust_managed_page_count(page, pageblock_nr_pages);

_

Patches currently in -mm which might be from [email protected] are