From: Masami Hiramatsu <mhiramat@kernel.org>
To: Tom Zanussi <zanussi@kernel.org>
Cc: rostedt@goodmis.org, artem.bityutskiy@linux.intel.com,
mhiramat@kernel.org, linux-kernel@vger.kernel.org,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH 1/3] tracing: Add missing nest end to synth_event_trace_start() error case
Date: Wed, 12 Feb 2020 12:24:12 +0900 [thread overview]
Message-ID: <20200212122412.9666e6fd30c8d5d48ea5a2d8@kernel.org> (raw)
In-Reply-To: <20abc444b3eeff76425f895815380abe7aa53ff8.1581374549.git.zanussi@kernel.org>
On Mon, 10 Feb 2020 17:06:48 -0600
Tom Zanussi <zanussi@kernel.org> wrote:
> 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.
>
Looks good to me.
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks,
> Signed-off-by: Tom Zanussi <zanussi@kernel.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.14.1
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2020-02-12 3:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 23:06 [PATCH 0/3] tracing: Synthetic event fixes and updates Tom Zanussi
2020-02-10 23:06 ` [PATCH 1/3] tracing: Add missing nest end to synth_event_trace_start() error case Tom Zanussi
2020-02-12 3:24 ` Masami Hiramatsu [this message]
2020-02-10 23:06 ` [PATCH 2/3] tracing: Don't return -EINVAL when tracing soft disabled synth events Tom Zanussi
2020-02-12 3:24 ` Masami Hiramatsu
2020-02-12 3:28 ` Steven Rostedt
2020-02-12 5:24 ` Masami Hiramatsu
2020-02-10 23:06 ` [PATCH 3/3] tracing: Consolidate trace() functions Tom Zanussi
2020-02-12 3:36 ` Masami Hiramatsu
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=20200212122412.9666e6fd30c8d5d48ea5a2d8@kernel.org \
--to=mhiramat@kernel.org \
--cc=artem.bityutskiy@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).