diff options
Diffstat (limited to 'kernel')
-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 10a3af821d2..660e107265f 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2421,7 +2421,13 @@ static void *module_alloc_update_bounds(unsigned long size) return ret; } -#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) { |