Linux Trace Kernel
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org,
	mathieu.desnoyers@efficios.com, kernel-team@android.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Fix logged instance name on creation failure
Date: Fri, 7 Aug 2026 19:05:14 +0900	[thread overview]
Message-ID: <20260807190514.bfcdac0afee5c155031da2cf@kernel.org> (raw)
In-Reply-To: <20260807085423.4175161-1-vdonnefort@google.com>

On Fri,  7 Aug 2026 09:54:23 +0100
Vincent Donnefort <vdonnefort@google.com> wrote:

> When boot instance creation fails, the kernel incorrectly logs "(null)"
> as the instance name because strsep() consumes curr_str entirely during
> parsing.
> 
> Print the properly parsed name variable instead. And while at it log
> the error code.
> 
> Fixes: cb1f98c5e574 ("tracing: Add creation of instances at boot command line")
> Signed-off-by: Vincent Donnefort <vdonnefort@google.com>

Good catch!

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thanks!

> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 01a5e87af299..26ae682021c8 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -9726,7 +9726,8 @@ __init static void enable_instances(void)
>  
>  		tr = trace_array_create_systems(name, NULL, addr, size);
>  		if (IS_ERR(tr)) {
> -			pr_warn("Tracing: Failed to create instance buffer %s\n", curr_str);
> +			pr_warn("Tracing: Failed to create instance buffer '%s' (%ld)\n", name,
> +				PTR_ERR(tr));
>  			continue;
>  		}
>  
> 
> base-commit: 075b74841bd0065a3bda3440873c747938e69b68
> -- 
> 2.55.0.654.g21b8a5bc05-goog
> 


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

      reply	other threads:[~2026-08-07 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  8:54 [PATCH] tracing: Fix logged instance name on creation failure Vincent Donnefort
2026-08-07 10:05 ` 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=20260807190514.bfcdac0afee5c155031da2cf@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=kernel-team@android.com \
    --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