tracing/user_events: Fix the incorrect trace record for empty arguments events
authorsunliming <sunliming@kylinos.cn>
Tue, 6 Jun 2023 06:20:24 +0000 (14:20 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 14 Jun 2023 16:41:52 +0000 (12:41 -0400)
commit6f05dcabe5c241d066ec472cf38ac8b84f8c9c6f
tree7c744fd135f87dc8819c77ef9b995ca52ee9aa88
parente70bb54d7a51299e7feca9169c07d79f9a3fc01d
tracing/user_events: Fix the incorrect trace record for empty arguments events

The user_events support events that has empty arguments. But the trace event
is discarded and not really committed when the arguments is empty. Fix this
by not attempting to copy in zero-length data.

Link: https://lkml.kernel.org/r/20230606062027.1008398-2-sunliming@kylinos.cn
Acked-by: Beau Belgrave <beaub@linux.microsoft.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: sunliming <sunliming@kylinos.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_user.c