android_kernel_samsung_msm8976/kernel/trace
Vaibhav Nagarnaik d08ab0f43e ring-buffer: Allow for rescheduling when removing pages
commit 83f365554e47997ec68dc4eca3f5dce525cd15c3 upstream.

When reducing ring buffer size, pages are removed by scheduling a work
item on each CPU for the corresponding CPU ring buffer. After the pages
are removed from ring buffer linked list, the pages are free()d in a
tight loop. The loop does not give up CPU until all pages are removed.
In a worst case behavior, when lot of pages are to be freed, it can
cause system stall.

After the pages are removed from the list, the free() can happen while
the work is rescheduled. Call cond_resched() in the loop to prevent the
system hangup.

Link: http://lkml.kernel.org/r/20180907223129.71994-1-vnagarnaik@google.com

Cc: stable@vger.kernel.org
Fixes: 83f40318da ("ring-buffer: Make removal of ring buffer pages atomic")
Reported-by: Jason Behmer <jbehmer@google.com>
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-27 21:51:54 +02:00
..
Kconfig
Makefile
blktrace.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
ftrace.c
gpu-traces.c
ipc_logging.c
ipc_logging_debug.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
ipc_logging_private.h
msm_rtb.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
power-traces.c
ring_buffer.c ring-buffer: Allow for rescheduling when removing pages 2019-07-27 21:51:54 +02:00
ring_buffer_benchmark.c ring-buffer-benchmark: Fix the wrong sched_priority of producer 2015-06-22 16:55:53 -07:00
rpm-traces.c
trace.c tracing: Fix possible double free on failure of allocating trace buffer 2019-07-27 21:46:22 +02:00
trace.h Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
trace_branch.c tracing: Have branch tracer use recursive field of task struct 2015-08-03 09:29:45 -07:00
trace_clock.c
trace_cpu_freq_switch.c
trace_entries.h
trace_event_perf.c trace: prevent NULL pointer dereference 2016-02-04 20:58:31 -08:00
trace_events.c tracing: Fix showing function event in available_events 2016-03-03 15:06:24 -08:00
trace_events_filter.c tracing/filter: Do not allow infix to exceed end of string 2015-08-03 09:29:45 -07:00
trace_events_filter_test.h
trace_export.c
trace_functions.c
trace_functions_graph.c
trace_irqsoff.c tracing: Have preempt(irqs)off trace preempt disabled functions 2016-06-07 10:42:47 +02:00
trace_kdb.c
trace_kprobe.c
trace_mmiotrace.c
trace_nop.c
trace_output.c Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
trace_output.h
trace_printk.c tracing: Handle NULL formats in hold_module_trace_bprintk_format() 2019-07-27 21:41:55 +02:00
trace_probe.c
trace_probe.h
trace_sched_switch.c
trace_sched_wakeup.c sched/deadline: Add SCHED_DEADLINE inheritance logic 2015-05-19 19:16:01 -07:00
trace_selftest.c sched/deadline: Add latency tracing for SCHED_DEADLINE tasks 2015-05-19 19:16:00 -07:00
trace_selftest_dynamic.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c