From: Steven Rostedt Date: Thu, 19 Dec 2024 20:12:00 +0000 (-0500) Subject: tracing: Return -EINVAL if a boot tracer tries to enable the mmiotracer at boot X-Git-Tag: v6.14-rc1~124^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1e27ee9c6f21ccbb3f2d910171427ceb66a0af1;p=thirdparty%2Fkernel%2Flinux.git tracing: Return -EINVAL if a boot tracer tries to enable the mmiotracer at boot The mmiotracer is not set to be enabled at boot up from the kernel command line. If the boot command line tries to enable that tracer, it will fail to be enabled. The return code is currently zero when that happens so the caller just thinks it was enabled. Return -EINVAL in this case. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Peter Zijlstra Link: https://lore.kernel.org/20241219201344.854254394@goodmis.org Signed-off-by: Steven Rostedt (Google) --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e6e1de69af018..0aaf442271e93 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6116,7 +6116,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf) if (system_state < SYSTEM_RUNNING && t->noboot) { pr_warn("Tracer '%s' is not allowed on command line, ignored\n", t->name); - return 0; + return -EINVAL; } /* Some tracers are only allowed for the top level buffer */