Skip to content

Commit cfac4ed

Browse files
sunlimingrostedt
authored andcommitted
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/[email protected] Signed-off-by: sunliming <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent ba470ee commit cfac4ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/trace/trace_events_user.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,8 @@ static bool user_event_match(const char *system, const char *event,
17451745

17461746
if (match && argc > 0)
17471747
match = user_fields_match(user, argc, argv);
1748+
else if (match && argc == 0)
1749+
match = list_empty(&user->fields);
17481750

17491751
return match;
17501752
}

0 commit comments

Comments
 (0)