[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231221012314.1d041383caf29e31c49dfc4e@kernel.org>
Date: Thu, 21 Dec 2023 01:23:14 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Masami
Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
Vincent Donnefort <vdonnefort@...gle.com>, Kent Overstreet
<kent.overstreet@...il.com>
Subject: Re: [PATCH v5 06/15] ring-buffer: Clear pages on error in
ring_buffer_subbuf_order_set() failure
On Tue, 19 Dec 2023 13:54:20 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
>
> On failure to allocate ring buffer pages, the pointer to the CPU buffer
> pages is freed, but the pages that were allocated previously were not.
> Make sure they are freed too.
>
> Fixes: TBD ("tracing: Set new size of the ring buffer sub page")
Do you merge this fix to the original one in the same series later?
I think it is better to merge it for git bisect.
Thank you,
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> kernel/trace/ring_buffer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index c2afcf98ea91..3c11e8e811ed 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -5927,6 +5927,7 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
> for_each_buffer_cpu(buffer, cpu) {
> if (!cpu_buffers[cpu])
> continue;
> + rb_free_cpu_buffer(cpu_buffers[cpu]);
> kfree(cpu_buffers[cpu]);
> }
> kfree(cpu_buffers);
> --
> 2.42.0
>
>
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists