This is a note to let you know that I've just added the patch titled
tracing/uprobes: Fix uprobe_cpu_buffer memory leak
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tracing-uprobes-fix-uprobe_cpu_buffer-memory-leak.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 6ea6215fe394e320468589d9bba464a48f6d823a Mon Sep 17 00:00:00 2001
From: "zhangwei(Jovi)" <[email protected]>
Date: Thu, 17 Apr 2014 16:05:19 +0800
Subject: tracing/uprobes: Fix uprobe_cpu_buffer memory leak
From: "zhangwei(Jovi)" <[email protected]>
commit 6ea6215fe394e320468589d9bba464a48f6d823a upstream.
Forgot to free uprobe_cpu_buffer percpu page in uprobe_buffer_disable().
Link: http://lkml.kernel.org/p/[email protected]
Acked-by: Namhyung Kim <[email protected]>
Signed-off-by: zhangwei(Jovi) <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/trace/trace_uprobe.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -728,9 +728,15 @@ static int uprobe_buffer_enable(void)
static void uprobe_buffer_disable(void)
{
+ int cpu;
+
BUG_ON(!mutex_is_locked(&event_mutex));
if (--uprobe_buffer_refcnt == 0) {
+ for_each_possible_cpu(cpu)
+ free_page((unsigned long)per_cpu_ptr(uprobe_cpu_buffer,
+ cpu)->buf);
+
free_percpu(uprobe_cpu_buffer);
uprobe_cpu_buffer = NULL;
}
Patches currently in stable-queue which might be from [email protected]
are
queue-3.14/tracing-uprobes-fix-uprobe_cpu_buffer-memory-leak.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html