android_kernel_oneplus_msm8998/kernel/trace
zhangyi (F) 19c53c1f81 tracing: Do not free iter->trace in fail path of tracing_open_pipe()
commit e7f0c424d0806b05d6f47be9f202b037eb701707 upstream.

Commit d716ff71dd ("tracing: Remove taking of trace_types_lock in
pipe files") use the current tracer instead of the copy in
tracing_open_pipe(), but it forget to remove the freeing sentence in
the error path.

There's an error path that can call kfree(iter->trace) after the iter->trace
was assigned to tr->current_trace, which would be bad to free.

Link: http://lkml.kernel.org/r/1550060946-45984-1-git-send-email-yi.zhang@huawei.com

Cc: stable@vger.kernel.org
Fixes: d716ff71dd ("tracing: Remove taking of trace_types_lock in pipe files")
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 08:44:35 +01:00
..
blktrace.c tracing/blktrace: Fix to allow setting same value 2018-09-09 20:04:34 +02:00
bpf_trace.c bpf: fix check of allowed specifiers in bpf_trace_printk 2018-12-17 21:55:10 +01:00
ftrace.c tracing: Fix memory leak of instance function hash filters 2018-12-21 14:09:51 +01:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-11-10 18:11:41 -08:00
Makefile Makefile: Mute warning for __builtin_return_address(>0) for tracing only 2016-09-30 10:18:35 +02:00
power-traces.c
ring_buffer.c ring-buffer: Allow for rescheduling when removing pages 2018-09-29 03:08:52 -07:00
ring_buffer_benchmark.c
rpm-traces.c
trace.c tracing: Do not free iter->trace in fail path of tracing_open_pipe() 2019-03-23 08:44:35 +01:00
trace.h
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c
trace_entries.h
trace_event_perf.c treewide: Remove old email address 2015-11-23 09:44:58 +01:00
trace_events.c tracing: Fix converting enum's from the map in trace_event_eval_update() 2018-01-23 19:50:16 +01:00
trace_events_filter.c tracing: Fix regex_match_front() to not over compare the test string 2018-05-16 10:06:51 +02:00
trace_events_filter_test.h
trace_events_trigger.c tracing: Fix memory leak in set_trigger_filter() 2018-12-21 14:09:51 +01:00
trace_export.c
trace_functions.c
trace_functions_graph.c tracing: Fix missing return symbol in function_graph output 2018-07-11 16:03:48 +02:00
trace_irqsoff.c tracing: Have preempt(irqs)off trace preempt disabled functions 2016-04-12 09:08:59 -07:00
trace_kdb.c
trace_kprobe.c tracing: Quiet gcc warning about maybe unused link variable 2018-08-06 16:24:30 +02:00
trace_mmiotrace.c
trace_nop.c
trace_output.c
trace_output.h
trace_printk.c tracing: Handle NULL formats in hold_module_trace_bprintk_format() 2016-07-27 09:47:32 -07:00
trace_probe.c tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:40:15 +02:00
trace_probe.h tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:40:15 +02:00
trace_sched_switch.c
trace_sched_wakeup.c
trace_selftest.c ftrace: Fix selftest goto location on error 2017-09-27 11:00:16 +02:00
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c tracing/stacktrace: Show entire trace if passed in function not found 2016-02-17 12:30:57 -08:00
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c tracing/uprobes: Fix output for multiple string arguments 2019-02-20 10:13:22 +01:00