From: Masami Hiramatsu (Google) <[email protected]>

Since commit 533059281ee5 ("tracing: probeevent: Introduce new argument
 fetching code") wrongly use @offset local variable during the parsing,
the offset value is added twice when dereferencing.
Reset the @offset after setting it in FETCH_OP_FOFFS.

Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching 
code")
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
Cc: [email protected]
---
 kernel/trace/trace_probe.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 98532c503d02..502fa6da5949 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -1241,6 +1241,7 @@ parse_probe_arg(char *arg, const struct fetch_type *type,
 
                        code->op = FETCH_OP_FOFFS;
                        code->immediate = (unsigned long)offset;  // imm64?
+                       offset = 0;
                } else {
                        /* uprobes don't support symbols */
                        if (!(ctx->flags & TPARG_FL_KERNEL)) {


Reply via email to