mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tengda Wu <wutengda@huaweicloud.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ftrace: Add global mutex to serialize trace_parser access
Date: Fri, 24 Jul 2026 18:47:57 -0400	[thread overview]
Message-ID: <20260724184757.502183d4@gandalf.local.home> (raw)
In-Reply-To: <20260723133404.1926732-1-wutengda@huaweicloud.com>

On Thu, 23 Jul 2026 13:34:04 +0000
Tengda Wu <wutengda@huaweicloud.com> wrote:

> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -1097,6 +1097,12 @@ struct ftrace_ops global_ops = {
>  					  FTRACE_OPS_FL_PID,
>  };
>  
> +/*
> + * parser_lock - Protects trace_parser state against concurrent operations.
> + * Held across trace_get_user() and subsequent buffer parsing to prevent races.
> + */
> +DEFINE_MUTEX(parser_lock);
> +

Sashiko pointed out[1] that this should be static. And it should. Could you
send a v4?

static DEFINE_MUTEX(parser_lock);

Note, you can ignore the other Sashiko comments.

-- Steve

[1] https://sashiko.dev/#/patchset/20260723133404.1926732-1-wutengda%40huaweicloud.com

  reply	other threads:[~2026-07-24 22:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 13:34 Tengda Wu
2026-07-24 22:47 ` Steven Rostedt [this message]
2026-07-25  0:50   ` Tengda Wu

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=20260724184757.502183d4@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=wutengda@huaweicloud.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®