projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9737800
)
tracing: Add missing nest end to synth_event_trace_start() error case
author
Tom Zanussi
<zanussi@kernel.org>
Mon, 10 Feb 2020 23:06:48 +0000
(17:06 -0600)
committer
Steven Rostedt (VMware)
<rostedt@goodmis.org>
Tue, 11 Feb 2020 02:58:19 +0000
(21:58 -0500)
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:
http://lkml.kernel.org/r/20abc444b3eeff76425f895815380abe7aa53ff8.1581374549.git.zanussi@kernel.org
Fixes:
8dcc53ad956d2
("tracing: Add synth_event_trace() and related functions")
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace_events_hist.c
b/kernel/trace/trace_events_hist.c
index
b3bcfd8
..
a546ffa
100644
(file)
--- 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;
}