This is a note to let you know that I've just added the patch titled tracing: Simplify conditional compilation code in tracing_set_tracer() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tracing-simplify-conditional-compilation-code-in-tra.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 86cfc8663c67806905c13b4e037a52d3e6cd7b64 Author: sunliming <sunliming@xxxxxxxxxx> Date: Thu Jun 2 22:06:13 2022 +0800 tracing: Simplify conditional compilation code in tracing_set_tracer() [ Upstream commit f4b0d318097e45cbac5e14976f8bb56aa2cef504 ] Two conditional compilation directives "#ifdef CONFIG_TRACER_MAX_TRACE" are used consecutively, and no other code in between. Simplify conditional the compilation code and only use one "#ifdef CONFIG_TRACER_MAX_TRACE". Link: https://lkml.kernel.org/r/20220602140613.545069-1-sunliming@xxxxxxxxxx Signed-off-by: sunliming <sunliming@xxxxxxxxxx> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> Stable-dep-of: a541a9559bb0 ("tracing: Do not free snapshot if tracer is on cmdline") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0dc17fd96102..21795777587b 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6416,9 +6416,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf) synchronize_rcu(); free_snapshot(tr); } -#endif -#ifdef CONFIG_TRACER_MAX_TRACE if (t->use_max_tr && !had_max_tr) { ret = tracing_alloc_snapshot_instance(tr); if (ret < 0)