mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
bootmem: remove the vmemmap pages from kmemleak in free_bootmem_page
commitdd0ff4d12d("bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem") fix an overlaps existing problem of kmemleak. But the problem still existed when HAVE_BOOTMEM_INFO_NODE is disabled, because in this case, free_bootmem_page() will call free_reserved_page() directly. Fix the problem by adding kmemleak_free_part() in free_bootmem_page() when HAVE_BOOTMEM_INFO_NODE is disabled. Link: https://lkml.kernel.org/r/[email protected] Fixes:f41f2ed43c("mm: hugetlb: free the vmemmap pages associated with each HugeTLB page") Signed-off-by: Liu Shixin <[email protected]> Acked-by: Muchun Song <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
1 parent
0d707cdefb
commit
028725e733
1 file changed
+2
@@ -3,6 +3,7 @@
|
||||
#define __LINUX_BOOTMEM_INFO_H
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/kmemleak.h>
|
||||
|
||||
/*
|
||||
* Types for free bootmem stored in page->lru.next. These have to be in
|
||||
@@ -59,6 +60,7 @@ static inline void get_page_bootmem(unsigned long info, struct page *page,
|
||||
|
||||
static inline void free_bootmem_page(struct page *page)
|
||||
{
|
||||
kmemleak_free_part(page_to_virt(page), PAGE_SIZE);
|
||||
free_reserved_page(page);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user