aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-10-28 09:33:09 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-10-28 11:11:00 -0400
commitc017b4be3e84176cab10eca5e6c4faeb8cfc6f3e (patch)
treeb858895759880262dff8754ef58b3e716bebae2c /kernel/module.c
parente7cb55b946a2182c347047dc903c6ed0daef100c (diff)
kmemleak: Simplify the kmemleak_scan_area() function prototype
This function was taking non-necessary arguments which can be determined by kmemleak. The patch also modifies the calling sites. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 8b7d8805819d..1eb952097077 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2043,9 +2043,7 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
2043 unsigned int i; 2043 unsigned int i;
2044 2044
2045 /* only scan the sections containing data */ 2045 /* only scan the sections containing data */
2046 kmemleak_scan_area(mod->module_core, (unsigned long)mod - 2046 kmemleak_scan_area(mod, sizeof(struct module), GFP_KERNEL);
2047 (unsigned long)mod->module_core,
2048 sizeof(struct module), GFP_KERNEL);
2049 2047
2050 for (i = 1; i < hdr->e_shnum; i++) { 2048 for (i = 1; i < hdr->e_shnum; i++) {
2051 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) 2049 if (!(sechdrs[i].sh_flags & SHF_ALLOC))
@@ -2054,8 +2052,7 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
2054 && strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0) 2052 && strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0)
2055 continue; 2053 continue;
2056 2054
2057 kmemleak_scan_area(mod->module_core, sechdrs[i].sh_addr - 2055 kmemleak_scan_area((void *)sechdrs[i].sh_addr,
2058 (unsigned long)mod->module_core,
2059 sechdrs[i].sh_size, GFP_KERNEL); 2056 sechdrs[i].sh_size, GFP_KERNEL);
2060 } 2057 }
2061} 2058}