soc: qcom: memory_dump_v2: use kmemleak_not_leak for mem dump's app table

table (of type msm_dump_table) is virtual address for app's base
table of memdump, which is converted to physical address and
holds it in the memdump.table_phys. This memory is not intended
to be freed. When kmemleak scans, it can't deduce that the reference
we are holding is via physical address and not virtual address.
Hence, kmemleak will treat this as a leak as it can't find
a reference to this variable. Supress this by using kmemleak_not_leak.

Change-Id: I5236c940688829a3b5f255c5ee9fcf309cf8ebb7
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
This commit is contained in:
Lingutla Chandrasekhar 2015-06-01 17:16:25 +05:30
parent c76f5b0e3b
commit 897678b8fa
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/kmemleak.h>
#include <soc/qcom/memory_dump.h>
#include <soc/qcom/scm.h>
@ -152,6 +153,7 @@ static int __init init_memory_dump(void)
ret = -ENOMEM;
goto err1;
}
kmemleak_not_leak(table);
table->version = MSM_DUMP_TABLE_VERSION;
entry.id = MSM_DUMP_TABLE_APPS;