Skip to content

Commit d090409

Browse files
Tom Zanussirostedt
authored andcommitted
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: http://lkml.kernel.org/r/20abc444b3eeff76425f895815380abe7aa53ff8.1581374549.git.zanussi@kernel.org Fixes: 8dcc53a ("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>
1 parent 9737800 commit d090409

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/trace/trace_events_hist.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,7 @@ int synth_event_trace_start(struct trace_event_file *file,
20432043
entry = trace_event_buffer_reserve(&trace_state->fbuffer, file,
20442044
sizeof(*entry) + fields_size);
20452045
if (!entry) {
2046+
ring_buffer_nest_end(trace_state->buffer);
20462047
ret = -EINVAL;
20472048
goto out;
20482049
}

0 commit comments

Comments
 (0)