From: Rusty Russell <rusty@rustcorp.com.au>
To: majianpeng <majianpeng@gmail.com>
Cc: lizefan@huawei.com, linux-kernel <linux-kernel@vger.kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH] module: Add section ".ref.data" into kmemleak-scan-area.
Date: Mon, 13 May 2013 11:54:09 +0930 [thread overview]
Message-ID: <87bo8f39di.fsf@rustcorp.com.au> (raw)
In-Reply-To: <518DAA1A.3010407@gmail.com>
majianpeng <majianpeng@gmail.com> writes:
> 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@gmail.com>
> ---
> kernel/module.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Catalin?
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cheers,
Rusty.
> 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
>
>>From 9adf5b9aae7ceb97828042d0ae8fe9fb688bc691 Mon Sep 17 00:00:00 2001
> From: Jianpeng Ma <majianpeng@gmail.com>
> Date: Sat, 11 May 2013 10:04:14 +0800
> 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@gmail.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
next prev parent reply other threads:[~2013-05-13 2:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-11 2:16 [PATCH] module: Add section ".ref.data" into kmemleak-scan-area majianpeng
2013-05-13 2:24 ` Rusty Russell [this message]
2013-05-13 16:42 ` Catalin Marinas
2013-05-15 4:55 ` Rusty Russell
2013-05-14 21:34 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bo8f39di.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=majianpeng@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox