]> git.baikalelectronics.ru Git - kernel.git/commit
bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem
authorLiu Shixin <liushixin2@huawei.com>
Fri, 19 Aug 2022 09:40:05 +0000 (17:40 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 28 Aug 2022 21:02:45 +0000 (14:02 -0700)
commitebf5fe29ac0e67d4bd0c9e15588a428c5a486781
treec12441a2276f92c26a42d9d2055111245903a8f2
parent1803497a4cc03102949e351e90af1c1b305536bc
bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem

The vmemmap pages is marked by kmemleak when allocated from memblock.
Remove it from kmemleak when freeing the page.  Otherwise, when we reuse
the page, kmemleak may report such an error and then stop working.

 kmemleak: Cannot insert 0xffff98fb6eab3d40 into the object search tree (overlaps existing)
 kmemleak: Kernel memory leak detector disabled
 kmemleak: Object 0xffff98fb6be00000 (size 335544320):
 kmemleak:   comm "swapper", pid 0, jiffies 4294892296
 kmemleak:   min_count = 0
 kmemleak:   count = 0
 kmemleak:   flags = 0x1
 kmemleak:   checksum = 0
 kmemleak:   backtrace:

Link: https://lkml.kernel.org/r/20220819094005.2928241-1-liushixin2@huawei.com
Fixes: fd8a6b940875 (mm: hugetlb: free the vmemmap pages associated with each HugeTLB page)
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/bootmem_info.c