]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tracing/probes: Fix double addition of offset for @+FOFFSET
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 24 Jun 2026 23:34:47 +0000 (08:34 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 30 Jun 2026 14:58:19 +0000 (23:58 +0900)
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.

Link: https://lore.kernel.org/all/178217905962.643090.1978577464942171332.stgit@devnote2/
Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
kernel/trace/trace_probe.c

index 98532c503d02834fd0857d966378cc0cb92b9342..502fa6da59492b1779b7015a2cfd4c67da79010d 100644 (file)
@@ -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)) {