diff options
author | Vignesh Radhakrishnan <vigneshr@codeaurora.org> | 2015-01-30 16:26:41 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:23:43 -0700 |
commit | 1dd9d8dd987cb634ab34f2002379b4a878bd2d8e (patch) | |
tree | bd52fc0160edd1e3f89a128485e97aab05b9f391 /kernel/module.c | |
parent | 1723ce4914dfb3627329ec4abe6e69d081087e35 (diff) |
kmemleak : Make module scanning optional using config
Currently kmemleak scans module memory as provided
in the area list. This takes up lot of time with
irq's and preemption disabled. Provide a compile
time configurable config to enable this functionality.
Change-Id: I5117705e7e6726acdf492e7f87c0703bc1f28da0
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
[satyap: trivial merge conflict resolution and remove duplicate entry]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index 3c137e55853b..2ec4df630677 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2579,7 +2579,13 @@ void * __weak module_alloc(unsigned long size) return vmalloc_exec(size); } -#ifdef CONFIG_DEBUG_KMEMLEAK +#if defined(CONFIG_DEBUG_KMEMLEAK) && defined(CONFIG_DEBUG_MODULE_SCAN_OFF) +static void kmemleak_load_module(const struct module *mod, + const struct load_info *info) +{ + kmemleak_no_scan(mod->module_core); +} +#elif defined(CONFIG_DEBUG_KMEMLEAK) static void kmemleak_load_module(const struct module *mod, const struct load_info *info) { |