Commit f8d7ab2b authored by Srikar Dronamraju's avatar Srikar Dronamraju Committed by Steven Rostedt (VMware)

tracing/probe: Fix same probe event argument matching

Commit fe60b0ce ("tracing/probe: Reject exactly same probe event")
tries to reject a event which matches an already existing probe.

However it currently continues to match arguments and rejects adding a
probe even when the arguments don't match. Fix this by only rejecting a
probe if and only if all the arguments match.

Link: http://lkml.kernel.org/r/20190924114906.14038-1-srikar@linux.vnet.ibm.com

Fixes: fe60b0ce ("tracing/probe: Reject exactly same probe event")
Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent b78b94b8
......@@ -549,9 +549,10 @@ static bool trace_kprobe_has_same_kprobe(struct trace_kprobe *orig,
for (i = 0; i < orig->tp.nr_args; i++) {
if (strcmp(orig->tp.args[i].comm,
comp->tp.args[i].comm))
continue;
break;
}
if (i == orig->tp.nr_args)
return true;
}
......
......@@ -431,9 +431,10 @@ static bool trace_uprobe_has_same_uprobe(struct trace_uprobe *orig,
for (i = 0; i < orig->tp.nr_args; i++) {
if (strcmp(orig->tp.args[i].comm,
comp->tp.args[i].comm))
continue;
break;
}
if (i == orig->tp.nr_args)
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment