From 70ce34b6b4a2c0500369030a6b08318814841a5d Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Thu, 12 Apr 2018 20:18:02 +0900 Subject: [PATCH] android: ion: push cma heap to kmemleak_ignore A reserved memory allocated by memblock is traceable by kmemleak. It also applies to CMA areas. But CMA areas are different from other reserved memories. They are unreserved after the kmem is initialized. It means that the pages in CMA areas are not allocated/reserved once all pages in CMA areas are returned to the kernel page allocator. Therefore a reserved memory to be a CMA area should be ignored by kmemleak. Change-Id: I17c6511bb2b9ad1279821092fe8ba1a0d0a63e6b Signed-off-by: Cho KyongHo --- drivers/staging/android/ion/ion_fdt_exynos.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/android/ion/ion_fdt_exynos.c b/drivers/staging/android/ion/ion_fdt_exynos.c index 15b4e85fd084..04983a327515 100644 --- a/drivers/staging/android/ion/ion_fdt_exynos.c +++ b/drivers/staging/android/ion/ion_fdt_exynos.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "ion.h" #include "ion_exynos.h" @@ -91,6 +92,8 @@ static int __init exynos_ion_reserved_mem_setup(struct reserved_mem *rmem) } ion_reserved_mem[reserved_mem_count].cma = cma; + + kmemleak_ignore_phys(rmem->base); } ion_reserved_mem[reserved_mem_count].base = rmem->base; -- 2.20.1