lineage_android_kernel_sams.../kernel/trace
Steven Rostedt (Red Hat) cba998b9b3 tracing: Fix leaks of filter preds
commit 60705c89460fdc7227f2d153b68b3f34814738a4 upstream.

Special preds are created when folding a series of preds that
can be done in serial. These are allocated in an ops field of
the pred structure. But they were never freed, causing memory
leaks.

This was discovered using the kmemleak checker:

unreferenced object 0xffff8800797fd5e0 (size 32):
  comm "swapper/0", pid 1, jiffies 4294690605 (age 104.608s)
  hex dump (first 32 bytes):
    00 00 01 00 03 00 05 00 07 00 09 00 0b 00 0d 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814b52af>] kmemleak_alloc+0x73/0x98
    [<ffffffff8111ff84>] kmemleak_alloc_recursive.constprop.42+0x16/0x18
    [<ffffffff81120e68>] __kmalloc+0xd7/0x125
    [<ffffffff810d47eb>] kcalloc.constprop.24+0x2d/0x2f
    [<ffffffff810d4896>] fold_pred_tree_cb+0xa9/0xf4
    [<ffffffff810d3781>] walk_pred_tree+0x47/0xcc
    [<ffffffff810d5030>] replace_preds.isra.20+0x6f8/0x72f
    [<ffffffff810d50b5>] create_filter+0x4e/0x8b
    [<ffffffff81b1c30d>] ftrace_test_event_filter+0x5a/0x155
    [<ffffffff8100028d>] do_one_initcall+0xa0/0x137
    [<ffffffff81afbedf>] kernel_init_freeable+0x14d/0x1dc
    [<ffffffff814b24b7>] kernel_init+0xe/0xdb
    [<ffffffff814d539c>] ret_from_fork+0x7c/0xb0
    [<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-19 10:54:40 -07:00
..
Kconfig ftrace: Update the kconfig for DYNAMIC_FTRACE 2013-03-14 11:29:51 -07:00
Makefile
blktrace.c
ftrace.c tracing: Reset ftrace_graph_filter_enabled if count is zero 2013-05-07 19:51:54 -07:00
power-traces.c
ring_buffer.c ring-buffer: Fix race between integrity check and readers 2013-01-17 08:50:51 -08:00
ring_buffer_benchmark.c
rpm-traces.c
trace.c tracing: Fix ftrace_dump() 2013-05-11 13:48:14 -07:00
trace.h tracing: Prevent buffer overwrite disabled for latency tracers 2013-04-05 10:04:37 -07:00
trace_branch.c
trace_clock.c
trace_entries.h
trace_event_perf.c
trace_events.c tracing: Do not enable function event with enable 2012-05-10 15:55:43 -04:00
trace_events_filter.c tracing: Fix leaks of filter preds 2013-05-19 10:54:40 -07:00
trace_events_filter_test.h
trace_export.c tracing: Do not enable function event with enable 2012-05-10 15:55:43 -04:00
trace_functions.c
trace_functions_graph.c
trace_irqsoff.c tracing: Prevent buffer overwrite disabled for latency tracers 2013-04-05 10:04:37 -07:00
trace_kdb.c
trace_kprobe.c
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Fix stacktrace of latency tracers (irqsoff and friends) 2012-04-19 17:00:13 -04:00
trace_output.h
trace_printk.c
trace_sched_switch.c
trace_sched_wakeup.c tracing: Prevent buffer overwrite disabled for latency tracers 2013-04-05 10:04:37 -07:00
trace_selftest.c tracing: Fix ftrace_dump() 2013-05-11 13:48:14 -07:00
trace_selftest_dynamic.c
trace_stack.c tracing: Check return value of tracing_init_dentry() 2013-05-07 19:51:54 -07:00
trace_stat.c tracing: Check return value of tracing_init_dentry() 2013-05-07 19:51:54 -07:00
trace_stat.h
trace_syscalls.c
trace_workqueue.c