From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Vincent Donnefort <vdonnefort@google.com>
Subject: Re: [PATCH] ring-buffer: Unlock resize on mmap error
Date: Fri, 14 Feb 2025 09:10:31 +0900 [thread overview]
Message-ID: <20250214091031.fc31a81a5e86148655998e4a@kernel.org> (raw)
In-Reply-To: <20250213131957.530ec3c5@gandalf.local.home>
On Thu, 13 Feb 2025 13:19:57 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> Memory mapping the tracing ring buffer will disable resizing the buffer.
> But if there's an error in the memory mapping like an invalid parameter,
> the function exits out without re-enabling the resizing of the ring
> buffer, preventing the ring buffer from being resized after that.
>
Looks good to me.
Reveiewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you,
> Cc: stable@vger.kernel.org
> Fixes: 117c39200d9d7 ("ring-buffer: Introducing ring-buffer mapping functions")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.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 b8e0ae15ca5b..07b421115692 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -7126,6 +7126,7 @@ int ring_buffer_map(struct trace_buffer *buffer, int cpu,
> kfree(cpu_buffer->subbuf_ids);
> cpu_buffer->subbuf_ids = NULL;
> rb_free_meta_page(cpu_buffer);
> + atomic_dec(&cpu_buffer->resize_disabled);
> }
>
> unlock:
> --
> 2.47.2
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2025-02-14 0:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 18:19 Steven Rostedt
2025-02-14 0:10 ` Masami Hiramatsu [this message]
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=20250214091031.fc31a81a5e86148655998e4a@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
--cc=vdonnefort@google.com \
/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
all inboxes | Powered by JetHome®