mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 12:52:29 -04:00
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.
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260807085423.4175161-1-vdonnefort@google.com
Fixes: cb1f98c5e5 ("tracing: Add creation of instances at boot command line")
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt
parent
cb8a75eec0
commit
a9a01be283
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user