[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20140715122426.7f2c8cd1@gandalf.local.home>
Date: Tue, 15 Jul 2014 12:24:26 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>, Oleg Nesterov <oleg@...hat.com>
Subject: [GIT PULL] tracing: instance_rmdir() leaks
ftrace_event_file->filter
Linus,
Oleg Nesterov fixed a memory leak that happens if a user creates
a tracing instance, sets up a filter in an event, and then removes
that instance. The filter allocates memory that is never freed
when the instance is destroyed.
Please pull the latest trace-fixes-v3.16-rc5 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-fixes-v3.16-rc5
Tag SHA1: 669ea50dfcff14f49119e15133c0b0eb32d1999a
Head SHA1: 2448e3493cb3874baa90725c87869455ebf11cd2
Oleg Nesterov (1):
tracing: instance_rmdir() leaks ftrace_event_file->filter
----
kernel/trace/trace_events.c | 1 +
1 file changed, 1 insertion(+)
---------------------------
commit 2448e3493cb3874baa90725c87869455ebf11cd2
Author: Oleg Nesterov <oleg@...hat.com>
Date: Fri Jul 11 21:06:38 2014 +0200
tracing: instance_rmdir() leaks ftrace_event_file->filter
instance_rmdir() path destroys the event files but forgets to free
file->filter. Change remove_event_file_dir() to free_event_filter().
Link: http://lkml.kernel.org/p/20140711190638.GA19517@redhat.com
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Tom Zanussi <tom.zanussi@...ux.intel.com>
Cc: "zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
Cc: stable@...r.kernel.org # 3.11+
Fixes: f6a84bdc75b5 "tracing: Introduce remove_event_file_dir()"
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index f99e0b3bca8c..2de53628689f 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -470,6 +470,7 @@ static void remove_event_file_dir(struct ftrace_event_file *file)
list_del(&file->list);
remove_subsystem(file->system);
+ free_event_filter(file->filter);
kmem_cache_free(file_cachep, file);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists