Xiao Yang
a289fd8647
tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation
commit 0bbe7f719985efd9adb3454679ecef0984cb6800 upstream.
Traced event can trigger 'snapshot' operation(i.e. calls snapshot_trigger()
or snapshot_count_trigger()) when register_snapshot_trigger() has completed
registration but doesn't allocate buffer for 'snapshot' event trigger. In
the rare case, 'snapshot' operation always detects the lack of allocated
buffer so make register_snapshot_trigger() allocate buffer first.
trigger-snapshot.tc in kselftest reproduces the issue on slow vm:
-----------------------------------------------------------
cat trace
...
ftracetest-3028 [002] .... 236.784290: sched_process_fork: comm=ftracetest pid=3028 child_comm=ftracetest child_pid=3036
<...>-2875 [003] .... 240.460335: tracing_snapshot_instance_cond: *** SNAPSHOT NOT ALLOCATED ***
<...>-2875 [003] .... 240.460338: tracing_snapshot_instance_cond: *** stopping trace here! ***
-----------------------------------------------------------
Link: http://lkml.kernel.org/r/20200414015145.66236-1-yangx.jy@cn.fujitsu.com
Cc: stable@vger.kernel.org
Fixes: 93e31ffbf4 ("tracing: Add 'snapshot' event trigger command")
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
2020-04-24 07:59:06 +02:00 |
| .. |
|
blktrace.c
|
tracing/blktrace: Fix to allow setting same value
|
2018-09-09 20:01:22 +02:00 |
|
bpf_trace.c
|
bpf: fix check of allowed specifiers in bpf_trace_printk
|
2018-12-17 09:38:33 +01:00 |
|
ftrace.c
|
ftrace: fpid_next() should increase position index
|
2020-02-28 15:42:40 +01:00 |
|
Kconfig
|
This release cycle is rather small. Just a few fixes to tracing.
|
2016-10-06 11:48:41 -07:00 |
|
Makefile
|
Disable the __builtin_return_address() warning globally after all
|
2016-10-12 10:23:41 -07:00 |
|
power-traces.c
|
cpufreq: schedutil: New governor based on scheduler utilization data
|
2016-04-02 01:09:12 +02:00 |
|
ring_buffer.c
|
trace: Fix preempt_enable_no_resched() abuse
|
2019-05-02 09:32:00 +02:00 |
|
ring_buffer_benchmark.c
|
ring_buffer: Remove unneeded smp_wmb() before wakeup of reader benchmark
|
2015-11-03 16:19:02 -05:00 |
|
rpm-traces.c
|
|
|
|
trace.c
|
tracing: Initialize iter->seq after zeroing in tracing_read_pipe()
|
2019-11-06 12:18:13 +01:00 |
|
trace.h
|
tracing: Silence GCC 9 array bounds warning
|
2019-07-10 09:55:28 +02:00 |
|
trace_benchmark.c
|
tracing: Only benchmark the time tracepoints take if tracing is on
|
2015-11-02 13:34:58 -05:00 |
|
trace_benchmark.h
|
|
|
|
trace_branch.c
|
tracing: Remove {start,stop}_branch_trace
|
2015-10-21 10:10:09 -04:00 |
|
trace_clock.c
|
tracing: Export tracing clock functions
|
2015-05-12 15:56:57 -04:00 |
|
trace_entries.h
|
tracing: Add NMI tracing in hwlat detector
|
2016-09-02 12:47:55 -04:00 |
|
trace_event_perf.c
|
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
|
2016-05-17 16:26:30 -07:00 |
|
trace_events.c
|
tracing: Fix partial reading of trace event's id file
|
2019-05-25 18:26:49 +02:00 |
|
trace_events_filter.c
|
tracing: Fix regex_match_front() to not over compare the test string
|
2018-05-16 10:08:43 +02:00 |
|
trace_events_filter_test.h
|
|
|
|
trace_events_hist.c
|
tracing: Use strncpy instead of memcpy for string keys in hist triggers
|
2019-03-23 13:19:45 +01:00 |
|
trace_events_trigger.c
|
tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation
|
2020-04-24 07:59:06 +02:00 |
|
trace_export.c
|
tracing: ftrace_event_is_function() can return boolean
|
2015-11-02 14:28:05 -05:00 |
|
trace_functions.c
|
ftrace: Have set_ftrace_pid use the bitmap like events do
|
2016-06-20 09:54:19 -04:00 |
|
trace_functions_graph.c
|
tracing: Fix missing return symbol in function_graph output
|
2018-07-11 16:26:43 +02:00 |
|
trace_hwlat.c
|
tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency
|
2019-10-17 13:42:46 -07:00 |
|
trace_irqsoff.c
|
tracing: Remove redundant reset per-CPU buff in irqsoff tracer
|
2016-03-18 16:39:11 -04:00 |
|
trace_kdb.c
|
tracing: Silence GCC 9 array bounds warning
|
2019-07-10 09:55:28 +02:00 |
|
trace_kprobe.c
|
tracing: Quiet gcc warning about maybe unused link variable
|
2018-08-03 07:55:12 +02:00 |
|
trace_mmiotrace.c
|
tracing: Expose CPU physical addresses (resource values) for PCI devices
|
2016-06-20 09:54:22 -04:00 |
|
trace_nop.c
|
tracing: Fix typoes in code comment and printk in trace_nop.c
|
2016-03-08 11:23:57 -05:00 |
|
trace_output.c
|
tracing: Add NMI tracing in hwlat detector
|
2016-09-02 12:47:55 -04:00 |
|
trace_output.h
|
tracing: Turn seq_print_user_ip() into a static function
|
2015-09-28 10:16:12 -04:00 |
|
trace_printk.c
|
tracing: Handle NULL formats in hold_module_trace_bprintk_format()
|
2016-06-20 09:46:12 -04:00 |
|
trace_probe.c
|
tracing: probeevent: Fix to support minus offset from symbol
|
2018-03-28 18:39:23 +02:00 |
|
trace_probe.h
|
tracing: probeevent: Fix to support minus offset from symbol
|
2018-03-28 18:39:23 +02:00 |
|
trace_sched_switch.c
|
sched/core: Fix trace_sched_switch()
|
2015-10-06 17:08:15 +02:00 |
|
trace_sched_wakeup.c
|
kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail
|
2020-01-14 20:04:26 +01:00 |
|
trace_selftest.c
|
ftrace: Fix selftest goto location on error
|
2017-09-27 14:39:23 +02:00 |
|
trace_selftest_dynamic.c
|
|
|
|
trace_seq.c
|
|
|
|
trace_stack.c
|
tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
|
2020-01-14 20:04:26 +01:00 |
|
trace_stat.c
|
tracing: Fix very unlikely race of registering two stat tracers
|
2020-02-28 15:42:21 +01:00 |
|
trace_stat.h
|
|
|
|
trace_syscalls.c
|
tracing/syscalls: fix multiline in error message text
|
2016-09-29 10:25:23 +02:00 |
|
trace_uprobe.c
|
tracing/uprobes: Fix output for multiple string arguments
|
2019-02-20 10:18:32 +01:00 |
|
tracing_map.c
|
tracing: Have the histogram compare functions convert to u64 first
|
2020-01-12 11:24:14 +01:00 |
|
tracing_map.h
|
tracing: Update some tracing_map constants and comments
|
2016-04-19 12:16:06 -04:00 |