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: <20250528093455.e710b3783bbdc93f8be66625@kernel.org>
Date: Wed, 28 May 2025 09:34:55 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
 <linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH] ring-buffer: Removed unnecessary if() goto out where
 out is the next line

On Tue, 27 May 2025 15:51:16 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> From: Steven Rostedt <rostedt@...dmis.org>
> 
> In the function ring_buffer_discard_commit() there's an if statement that
> jumps to the next line:
> 
> 	if (rb_try_to_discard(cpu_buffer, event))
> 		goto out;
>  out:
> 
> This was caused by the change that modified the way timestamps were taken
> in interrupt context, and removed the code between the if statement and
> the goto, but failed to update the conditional logic.
> 

OK, so this is a kind of cleanup.

Reviewed-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thanks,

> Fixes: a389d86f7fd0 ("ring-buffer: Have nested events still record running time stamp")
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
>  kernel/trace/ring_buffer.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index e2aa90dc8d9e..0a3be3a01d14 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -4681,10 +4681,7 @@ void ring_buffer_discard_commit(struct trace_buffer *buffer,
>  	RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing));
>  
>  	rb_decrement_entry(cpu_buffer, event);
> -	if (rb_try_to_discard(cpu_buffer, event))
> -		goto out;
> -
> - out:
> +	rb_try_to_discard(cpu_buffer, event);
>  	rb_end_commit(cpu_buffer);
>  
>  	trace_recursive_unlock(cpu_buffer);
> -- 
> 2.47.2
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ