linux/kernel/trace
Steven Rostedt (VMware) ee310e8ebb tracing: Fix memory leak of instance function hash filters
commit 2840f84f74 upstream.

The following commands will cause a memory leak:

 # cd /sys/kernel/tracing
 # mkdir instances/foo
 # echo schedule > instance/foo/set_ftrace_filter
 # rmdir instances/foo

The reason is that the hashes that hold the filters to set_ftrace_filter and
set_ftrace_notrace are not freed if they contain any data on the instance
and the instance is removed.

Found by kmemleak detector.

Cc: stable@vger.kernel.org
Fixes: 591dffdade ("ftrace: Allow for function tracing instance to filter functions")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19 19:19:52 +01:00
..
blktrace.c
bpf_trace.c bpf: fix check of allowed specifiers in bpf_trace_printk 2018-12-17 09:24:35 +01:00
ftrace.c tracing: Fix memory leak of instance function hash filters 2018-12-19 19:19:52 +01:00
Kconfig
Makefile
power-traces.c
preemptirq_delay_test.c
ring_buffer_benchmark.c
ring_buffer.c
rpm-traces.c
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c
trace_entries.h
trace_event_perf.c
trace_events_filter_test.h
trace_events_filter.c tracing: Fix memory leak in create_filter() 2018-12-19 19:19:52 +01:00
trace_events_hist.c
trace_events_trigger.c tracing: Fix memory leak in set_trigger_filter() 2018-12-19 19:19:52 +01:00
trace_events.c
trace_export.c
trace_functions_graph.c tracing/fgraph: Fix set_graph_function from showing interrupts 2018-12-08 12:59:07 +01:00
trace_functions.c
trace_hwlat.c
trace_irqsoff.c tracing/fgraph: Fix set_graph_function from showing interrupts 2018-12-08 12:59:07 +01:00
trace_kdb.c
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_kprobe.c
trace_mmiotrace.c
trace_nop.c
trace_output.c
trace_output.h
trace_preemptirq.c
trace_printk.c
trace_probe.c
trace_probe.h
trace_sched_switch.c
trace_sched_wakeup.c tracing/fgraph: Fix set_graph_function from showing interrupts 2018-12-08 12:59:07 +01:00
trace_selftest_dynamic.c
trace_selftest.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c
trace.c
trace.h tracing/fgraph: Fix set_graph_function from showing interrupts 2018-12-08 12:59:07 +01:00
tracing_map.c
tracing_map.h