diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-07-11 21:06:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-28 08:08:20 -0700 |
commit | 7d88bf615c1bfea0b42ac3a18ccd9d84a60b2ccc (patch) | |
tree | a058eb4db5faec9f7e7d1bf31430df84e60b4f20 | |
parent | 2e76928c94eab457a8505ad0df1a44b161b1a4ff (diff) | |
download | lwn-7d88bf615c1bfea0b42ac3a18ccd9d84a60b2ccc.tar.gz lwn-7d88bf615c1bfea0b42ac3a18ccd9d84a60b2ccc.zip |
tracing: instance_rmdir() leaks ftrace_event_file->filter
commit 2448e3493cb3874baa90725c87869455ebf11cd2 upstream.
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@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
Fixes: f6a84bdc75b5 "tracing: Introduce remove_event_file_dir()"
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | kernel/trace/trace_events.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 3ddfd8f62c05..aec1dac0a4e4 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); } |