Commit cfac4ed7 authored by sunliming's avatar sunliming Committed by Steven Rostedt (Google)
Browse files

tracing/user_events: Handle matching arguments that is null from dyn_events

When A registering user event from dyn_events has no argments, it will pass the
matching check, regardless of whether there is a user event with the same name
and arguments. Add the matching check when the arguments of registering user
event is null.

Link: https://lore.kernel.org/linux-trace-kernel/20230529065110.303440-1-sunliming@kylinos.cn



Signed-off-by: default avatarsunliming <sunliming@kylinos.cn>
Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent ba470eeb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1745,6 +1745,8 @@ static bool user_event_match(const char *system, const char *event,

	if (match && argc > 0)
		match = user_fields_match(user, argc, argv);
	else if (match && argc == 0)
		match = list_empty(&user->fields);

	return match;
}