tracing: Fix logged instance name on creation failure
PATCH 1/1 tracing: Fix logged instance name on creation failure
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 <[email protected]>
kernel/trace/trace.c +2 -1
@@ -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
Signature · 1 line
2.55.0.654.g21b8a5bc05-goog
Quoted 9 lines · On Fri, 7 Aug 2026 09:54:23 +0100 Vincent Donnefort <[email protected]>…
When boot instance creation fails, the kernel incorrectly logs "(null)" as the instance name because
strsep()consumescurr_strentirely 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 <[email protected]>
Good catch!
Thanks!
Quoted 20 lines
kernel/trace/trace.c +2
-1@@ -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:
075b74841bd0065a3bda3440873c747938e69b68Signature · 1 line
2.55.0.654.g21b8a5bc05-goog
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>