Skip to contentSkip to conversation

mm-bootmem_info-remove-call-to-kmemleak_free_part_phys.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 2

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/bootmem_info: remove call to kmemleak_free_part_phys()
has been removed from the -mm tree. Its filename was
mm-bootmem_info-remove-call-to-kmemleak_free_part_phys.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 (Arm)" <[email protected]>
Subject: mm/bootmem_info: remove call to kmemleak_free_part_phys()
Date: Mon, 11 May 2026 16:05:32 +0200

The call to kmemleak_free_part_phys() was added in 2022 in commit dd0ff4d12dd2 ("bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem").

In 2025, commit b2aad24b5333 ("mm/memmap: prevent double scanning of memmap by kmemleak") started to use MEMBLOCK_ALLOC_NOLEAKTRACE when allocating the memmap to skip the kmemleak_alloc_phys() in the buddy.

So remove the call to kmemleak_free_part_phys(). If this would still be required for other purposes, either free_reserved_page() should take care of it, or selected users.

Cc Alexander Gordeev <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc David S. Miller <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Ritesh Harjani (IBM) <[email protected]>

---

 include/linux/bootmem_info.h |    1 -
 mm/bootmem_info.c            |    1 -
 2 files changed, 2 deletions(-)
include/linux/bootmem_info.h renamed from include/linux/bootmem_info.h~mm-bootmem_info-remove-call-to-kmemleak_free_part_phys +0 -1
@@ -82,7 +82,6 @@ static inline void get_page_bootmem(unsi
 
 static inline void free_bootmem_page(struct page *page)
 {
-	kmemleak_free_part_phys(PFN_PHYS(page_to_pfn(page)), PAGE_SIZE);
 	free_reserved_page(page);
 }
 #endif
mm/bootmem_info.c renamed from mm/bootmem_info.c~mm-bootmem_info-remove-call-to-kmemleak_free_part_phys +0 -1
@@ -32,7 +32,6 @@ void put_page_bootmem(struct page *page)
 
 	if (page_ref_dec_return(page) == 1) {
 		set_page_private(page, 0);
-		kmemleak_free_part_phys(PFN_PHYS(page_to_pfn(page)), PAGE_SIZE);
 		free_reserved_page(page);
 	}
 }

_

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