path: root/kernel
diff options
authorTom Zanussi <>2020-02-10 17:06:48 -0600
committerSteven Rostedt (VMware) <>2020-02-10 21:58:19 -0500
commitd090409abbdd1fcbdfd6ed66612390ba8c814749 (patch)
treeba590fed50e2fc5f496d7b4f9f46bc2156fb24b2 /kernel
parent973780011106c534d69c4d25fe0749bd3a5f0b53 (diff)
tracing: Add missing nest end to synth_event_trace_start() error case
If the ring_buffer reserve in synth_event_trace_start() fails, the matching ring_buffer_nest_end() should be called in the error code, since nothing else will ever call it in this case. Link: Fixes: 8dcc53ad956d2 ("tracing: Add synth_event_trace() and related functions") Signed-off-by: Tom Zanussi <> Signed-off-by: Steven Rostedt (VMware) <>
Diffstat (limited to 'kernel')
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index b3bcfd8c7332..a546ffa14785 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -2043,6 +2043,7 @@ int synth_event_trace_start(struct trace_event_file *file,
entry = trace_event_buffer_reserve(&trace_state->fbuffer, file,
sizeof(*entry) + fields_size);
if (!entry) {
+ ring_buffer_nest_end(trace_state->buffer);
ret = -EINVAL;
goto out;