linux-uconsole/kernel/trace
Adrian Salido 4c0933247e ANDROID: tracing: fix race condition reading saved tgids
Commit 939c7a4f04 ("tracing: Introduce saved_cmdlines_size file")
introduced ability to change saved cmdlines size. This resized saved
command lines but missed resizing tgid mapping as well.

Another issue is that when the resize happens, it removes saved command
lines and reallocates new memory for it. This introduced a race
condition when reading the global savecmd as this can be freed in the
middle of accessing it causing a use after free access. Fix this by
implementing locking.

Signed-off-by: Adrian Salido <salidoa@google.com>
Bug: 36007735
Change-Id: I334791ac35f8bcbd34362ed112aa624275a46947
(cherry picked from commit 7116d306da66de0de21e982024b4d3a3056f4461)
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2018-10-04 14:16:57 +05:30
..
blktrace.c tracing/blktrace: Fix to allow setting same value 2018-09-09 20:04:34 +02:00
bpf_trace.c
ftrace.c ftrace: Remove incorrect setting of glob search field 2018-02-16 20:09:47 +01:00
gpu-traces.c
Kconfig FROMLIST: tracing: Add support for preempt and irq enable/disable events 2017-10-15 23:53:55 +05:30
Makefile FROMLIST: tracing: Add support for preempt and irq enable/disable events 2017-10-15 23:53:55 +05:30
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 ANDROID: tracing: fix race condition reading saved tgids 2018-10-04 14:16:57 +05:30
trace.h trace: Add an option to show tgids in trace output 2016-02-16 13:53:27 -08:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c
trace_entries.h
trace_event_perf.c
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 possible double free in event_enable_trigger_func() 2018-08-06 16:24:29 +02:00
trace_export.c
trace_functions.c
trace_functions_graph.c Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2018-07-13 13:22:34 +01:00
trace_irqsoff.c FROMLIST: tracing: Add support for preempt and irq enable/disable events 2017-10-15 23:53:55 +05:30
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: fix compilation for 4.1 2016-02-16 13:53:29 -08:00
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 uprobes: Use synchronize_rcu() not synchronize_sched() 2018-09-09 20:04:34 +02:00