tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 5 Apr 2023 02:21:14 +0000 (22:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:35:12 +0000 (12:35 +0200)
commitf58574f238c33dc21b6cfea0cedbb7b6685dbe28
tree94109033f62107639263bffd49ba6c4a1e8b0952
parent5620eeb379d100f6b6879540de1fbf8fd80a6e56
tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance

[ Upstream commit 9d52727f8043cfda241ae96896628d92fa9c50bb ]

If a trace instance has a failure with its snapshot code, the error
message is to be written to that instance's buffer. But currently, the
message is written to the top level buffer. Worse yet, it may also disable
the top level buffer and not the instance that had the issue.

Link: https://lkml.kernel.org/r/20230405022341.688730321@goodmis.org
Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ross Zwisler <zwisler@google.com>
Fixes: 2824f50332486 ("tracing: Make the snapshot trigger work with instances")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/trace.c