From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tom Zanussi <zanussi@kernel.org>
Subject: [for-linus][PATCH 3/5] tracing: Add missing nest end to synth_event_trace_start() error case
Date: Tue, 11 Feb 2020 08:49:44 -0500 [thread overview]
Message-ID: <20200211134958.180801483@goodmis.org> (raw)
In-Reply-To: 20200211134941.229027482@goodmis.org
From: Tom Zanussi <zanussi@kernel.org>
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 | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.24.1
next prev parent reply other threads:[~2020-02-11 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 13:49 [for-linus][PATCH 0/5] tracing: A few more patches for 5.6 Steven Rostedt
2020-02-11 13:49 ` [for-linus][PATCH 1/5] bootconfig: Allocate xbc_nodes array dynamically Steven Rostedt
2020-02-11 13:49 ` [for-linus][PATCH 2/5] tools/bootconfig: Suppress non-error messages Steven Rostedt
2020-02-11 13:49 ` Steven Rostedt [this message]
2020-02-11 13:49 ` [for-linus][PATCH 4/5] tracing: Dont return -EINVAL when tracing soft disabled synth events Steven Rostedt
2020-02-11 13:49 ` [for-linus][PATCH 5/5] tracing: Consolidate trace() functions Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200211134958.180801483@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=zanussi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.