kernel-fxtec-pro1x/kernel/trace
Steven Rostedt (VMware) 2fd5a462eb ftrace: Move RCU is watching check after recursion check
commit b40341fad6cc2daa195f8090fd3348f18fff640a upstream.

The first thing that the ftrace function callback helper functions should do
is to check for recursion. Peter Zijlstra found that when
"rcu_is_watching()" had its notrace removed, it caused perf function tracing
to crash. This is because the call of rcu_is_watching() is tested before
function recursion is checked and and if it is traced, it will cause an
infinite recursion loop.

rcu_is_watching() should still stay notrace, but to prevent this should
never had crashed in the first place. The recursion prevention must be the
first thing done in callback functions.

Link: https://lore.kernel.org/r/20200929112541.GM2628@hirez.programming.kicks-ass.net

Cc: stable@vger.kernel.org
Cc: Paul McKenney <paulmck@kernel.org>
Fixes: c68c0fa293 ("ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too")
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reported-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07 08:00:05 +02:00
..
blktrace.c blktrace: ensure our debugfs dir exists 2020-09-03 11:24:18 +02:00
bpf_trace.c
ftrace.c ftrace: Move RCU is watching check after recursion check 2020-10-07 08:00:05 +02:00
Kconfig Stop the ad-hoc games with -Wno-maybe-initialized 2020-05-20 08:18:45 +02:00
Makefile
power-traces.c
preemptirq_delay_test.c
ring_buffer.c ring-buffer: Zero out time extend if it is nested and not absolute 2020-06-30 23:17:17 -04:00
ring_buffer_benchmark.c
rpm-traces.c
trace.c tracing: Use address-of operator on section symbols 2020-10-01 13:14:38 +02:00
trace.h
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c
trace_entries.h tracing: Set kernel_stack's caller size properly 2020-10-01 13:14:31 +02:00
trace_event_perf.c
trace_events.c tracing: Adding NULL checks for trace_array descriptor pointer 2020-10-01 13:14:27 +02:00
trace_events_filter.c tracing: Have error path in predicate_parse() free its allocated memory 2020-08-05 10:05:59 +02:00
trace_events_filter_test.h
trace_events_hist.c tracing: fix double free 2020-10-01 13:14:53 +02:00
trace_events_trigger.c tracing: Fix event trigger to accept redundant spaces 2020-06-30 23:17:17 -04:00
trace_export.c
trace_functions.c
trace_functions_graph.c
trace_hwlat.c tracing/hwlat: Honor the tracing_cpumask 2020-08-21 11:05:33 +02:00
trace_irqsoff.c
trace_kdb.c
trace_kprobe.c
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_output.c
trace_output.h
trace_preemptirq.c lockdep: fix order in trace_hardirqs_off_caller() 2020-10-01 13:14:50 +02:00
trace_printk.c
trace_probe.c
trace_probe.h
trace_sched_switch.c
trace_sched_wakeup.c
trace_selftest.c
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c
tracing_map.c
tracing_map.h