[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <518DAA1A.3010407@gmail.com>
Date: Sat, 11 May 2013 10:16:58 +0800
From: majianpeng <majianpeng@...il.com>
To: rusty@...tcorp.com.au
CC: lizefan@...wei.com, linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] module: Add section ".ref.data" into kmemleak-scan-area.
In commit 523c81135,it used "__refdata" on event_class_ftrace_##call.
It will cause kmemleak to misjudge because when loading module it did
not add '.ref.data' into kmemleak-scan-area.
Signed-off-by: Jianpeng Ma <majianpeng@...il.com>
---
kernel/module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/module.c b/kernel/module.c
index b049939..dafe2ea 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2434,7 +2434,8 @@ static void kmemleak_load_module(const struct module *mod,
const char *name = info->secstrings + info->sechdrs[i].sh_name;
if (!(info->sechdrs[i].sh_flags & SHF_ALLOC))
continue;
- if (!strstarts(name, ".data") && !strstarts(name, ".bss"))
+ if (!strstarts(name, ".data") && !strstarts(name, ".bss") &&
+ !strstarts(name, ".ref.data"))
continue;
kmemleak_scan_area((void *)info->sechdrs[i].sh_addr,
--
1.7.10.4
View attachment "0001-module-Add-section-.ref.data-to-kmemleak-area.patch" of type "text/x-patch" (1124 bytes)
Powered by blists - more mailing lists