Skip to content

Commit a1d23d5

Browse files
ctmarinasozbenh
authored andcommitted
powerpc/kmemleak: Do not scan the DART table
The DART table allocation is registered to kmemleak via the memblock_alloc_base() call. However, the DART table is later unmapped and dart_tablebase VA no longer accessible. This patch tells kmemleak not to scan this block and avoid an unhandled paging request. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent aa83f3d commit a1d23d5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎arch/powerpc/sysdev/dart_iommu.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ void __init alloc_dart_table(void)
476476
*/
477477
dart_tablebase = (unsigned long)
478478
__va(memblock_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
479+
/*
480+
* The DART space is later unmapped from the kernel linear mapping and
481+
* accessing dart_tablebase during kmemleak scanning will fault.
482+
*/
483+
kmemleak_no_scan((void *)dart_tablebase);
479484

480485
printk(KERN_INFO "DART table allocated at: %lx\n", dart_tablebase);
481486
}

0 commit comments

Comments
 (0)