mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tengda Wu <wutengda@huaweicloud.com>
To: Steven Rostedt <rostedt@goodmis.org>
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: Sat, 25 Jul 2026 08:50:50 +0800	[thread overview]
Message-ID: <3efb6324-18fc-48d0-a62e-7bce889eb4e7@huaweicloud.com> (raw)
In-Reply-To: <20260724184757.502183d4@gandalf.local.home>



On 2026/7/25 6:47, Steven Rostedt wrote:
> 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

Sorry, I overlooked that. Will add static and send v4 right away.

Thanks,
Tengda


      reply	other threads:[~2026-07-25  0:50 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
2026-07-25  0:50   ` Tengda Wu [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=3efb6324-18fc-48d0-a62e-7bce889eb4e7@huaweicloud.com \
    --to=wutengda@huaweicloud.com \
    --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=rostedt@goodmis.org \
    /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®