Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
	}

+3 −2
Original line number Diff line number Diff line
@@ -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;
	}