lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200212122412.9666e6fd30c8d5d48ea5a2d8@kernel.org>
Date:   Wed, 12 Feb 2020 12:24:12 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Tom Zanussi <zanussi@...nel.org>
Cc:     rostedt@...dmis.org, artem.bityutskiy@...ux.intel.com,
        mhiramat@...nel.org, linux-kernel@...r.kernel.org,
        linux-rt-users@...r.kernel.org
Subject: Re: [PATCH 1/3] tracing: Add missing nest end to
 synth_event_trace_start() error case

On Mon, 10 Feb 2020 17:06:48 -0600
Tom Zanussi <zanussi@...nel.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@...nel.org>

Thanks,

> Signed-off-by: Tom Zanussi <zanussi@...nel.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@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ