Skip to content

Commit fc9d276

Browse files
JuliaLawallrostedt
authored andcommitted
tracing/probe: reverse arguments to list_add
Elsewhere in the file, the function trace_kprobe_has_same_kprobe uses a trace_probe_event.probes object as the second argument of list_for_each_entry, ie as a list head, while the list_for_each_entry iterates over the list fields of the trace_probe structures, making them the list elements. So, exchange the arguments on the list_add call to put the list head in the second argument. Since both list_head structures were just initialized, this problem did not cause any loss of information. Link: https://lkml.kernel.org/r/[email protected] Fixes: 60d53e2 ("tracing/probe: Split trace_event related data from trace_probe") Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 98d0a68 commit fc9d276

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ int trace_probe_init(struct trace_probe *tp, const char *event,
10061006
INIT_LIST_HEAD(&tp->event->class.fields);
10071007
INIT_LIST_HEAD(&tp->event->probes);
10081008
INIT_LIST_HEAD(&tp->list);
1009-
list_add(&tp->event->probes, &tp->list);
1009+
list_add(&tp->list, &tp->event->probes);
10101010

10111011
call = trace_probe_event_call(tp);
10121012
call->class = &tp->event->class;

0 commit comments

Comments
 (0)