History

tracing: Test the 'Do not trace this pid' case in create event

When creating a new event (via a module, kprobe, eprobe, etc), the descriptors that are created must add flags for pid filtering if an instance has pid filtering enabled, as the flags are used at the time the event is executed to know if pid filtering should be done or not. The "Only trace this pid" case was added, but a cut and paste error made that case checked twice, instead of checking the "Trace all but this pid" case. Link: https://lore.kernel.org/all/202111280401.qC0z99JB-lkp@intel.com/

Steven Rostedt (VMware) committed 4 years ago

Commit 27ff7681 parent a55f2241 file · +1 −1Browse files

Unified · Split

kernel/trace/trace_events.c+1−1
@@ -2693,7 +2693,7 @@ trace_create_new_event(struct trace_event_call *call, · 2692 unmodified lines
2693 lockdep_is_held(&event_mutex));2693 lockdep_is_held(&event_mutex));
2694 2694
2695 if (!trace_pid_list_first(pid_list, &first) ||2695 if (!trace_pid_list_first(pid_list, &first) ||
2696 !trace_pid_list_first(pid_list, &first))2696 !trace_pid_list_first(no_pid_list, &first))
2697 file->flags |= EVENT_FILE_FL_PID_FILTER;2697 file->flags |= EVENT_FILE_FL_PID_FILTER;
2698 2698
2699 file->event_call = call;2699 file->event_call = call;