From: Steven Rostedt <rostedt@goodmis.org>
To: Shu Wang <shuwang@redhat.com>
Cc: mingo@redhat.com, chuhu@redhat.com, liwang@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ftrace: fix kmemleak in unregister_ftrace_graph
Date: Tue, 3 Oct 2017 10:29:54 -0400 [thread overview]
Message-ID: <20171003102954.6a7f0f43@gandalf.local.home> (raw)
In-Reply-To: <1894046657.10455897.1506427286860.JavaMail.zimbra@redhat.com>
On Tue, 26 Sep 2017 08:01:26 -0400 (EDT)
Shu Wang <shuwang@redhat.com> wrote:
> > From: shuwang@redhat.com
> > To: rostedt@goodmis.org, mingo@redhat.com
> > Cc: chuhu@redhat.com, liwang@redhat.com, linux-kernel@vger.kernel.org, "Shu Wang" <shuwang@redhat.com>
> > Sent: Tuesday, September 12, 2017 10:14:54 AM
> > Subject: [PATCH] ftrace: fix kmemleak in unregister_ftrace_graph
> >
> > From: Shu Wang <shuwang@redhat.com>
> >
> > The trampoline allocated by function tracer was
> > overwrite by function_graph tracer, and cause
> > memory leak. The save_global_trampoline should
> > save previous trampoline in register_ftrace_graph
> > and restore it in unregister_ftrace_graph. But
> > as it implemented, save_global_trampoline was only
> > used in unregister_ftrace_graph as default value 0,
> > and overwrite the previous trampoline's value.
> >
> > kmmeleak backtrace:
> > kmemleak_vmalloc+0x77/0xc0
> > __vmalloc_node_range+0x1b5/0x2c0
> > module_alloc+0x7c/0xd0
> > arch_ftrace_update_trampoline+0xb5/0x290
> > ftrace_startup+0x78/0x210
> > register_ftrace_function+0x8b/0xd0
> > function_trace_init+0x4f/0x80
> > tracing_set_tracer+0xe6/0x170
> > tracing_set_trace_write+0x90/0xd0
> > __vfs_write+0x37/0x170
> > vfs_write+0xb2/0x1b0
> > SyS_write+0x55/0xc0
> > do_syscall_64+0x67/0x180
> > return_from_SYSCALL_64+0x0/0x6a
> >
> > Signed-off-by: Shu Wang <shuwang@redhat.com>
> >
>
> ping
Thanks for the reminder. I pulled it in and will send this out to Linus
after the testing finishes. I also marked it for stable.
-- Steve
prev parent reply other threads:[~2017-10-03 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 2:14 shuwang
2017-09-26 12:01 ` Shu Wang
2017-10-03 14:29 ` Steven Rostedt [this message]
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=20171003102954.6a7f0f43@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=chuhu@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwang@redhat.com \
--cc=mingo@redhat.com \
--cc=shuwang@redhat.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
all inboxes | Powered by JetHome®