Skip to contentSkip to conversation

probes: fixes for v6.16

GIT PULL Merged Masami Hiramatsu (Google) 2 participants 2 messages Jul 16, 2025 – Jul 17, 2025 Tracing

lore
Share & tools
lore

Masami Hiramatsu (Google)

author maintainer
#0 lore raw

Hi Linus,

Probes fixes for v6.16-rc6:

- fprobe-event: The @params variable was being used in an error path without being initialized. The fix to return an error code.

Please pull the latest probes-fixes-v6.16-rc6 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.16-rc6

Tag SHA1: ce8ff29973d1200622606428e017c32f36535d8a Head SHA1: 1ed171a3afe81531b3ace96bd151a372dda3ee25

Nathan Chancellor (1):
tracing/probes: Avoid using params uninitialized in parse_btf_arg()

----

 kernel/trace/trace_probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 1ed171a3afe81531b3ace96bd151a372dda3ee25
Author: Nathan Chancellor <[email protected]>
Date:   Tue Jul 15 20:19:44 2025 -0700

tracing/probes: Avoid using params uninitialized in parse_btf_arg()

After a recent change in clang to strengthen uninitialized warnings [1], it points out that in one of the error paths in parse_btf_arg(), params is used uninitialized:

kernel/trace/trace_probe.c:660:19: warning: variable 'params' is uninitialized when used here [-Wuninitialized]
660 | return PTR_ERR(params);
| ^~~~~~

Match many other NO_BTF_ENTRY error cases and return -ENOENT, clearing up the warning.

kernel/trace/trace_probe.c +1 -1
index 424751cdf31f..40830a3ecd96 100644
@@ -657,7 +657,7 @@ static int parse_btf_arg(char *varname,
 		ret = query_btf_context(ctx);
 		if (ret < 0 || ctx->nr_params == 0) {
 			trace_probe_log_err(ctx->offset, NO_BTF_ENTRY);
-			return PTR_ERR(params);
+			return -ENOENT;
 		}
 	}
 	params = ctx->params;
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
merge bot Merged
#1 lore raw
The pull request you sent on Wed, 16 Jul 2025 15:22:01 +0900:

The pull request you sent on Wed, 16 Jul 2025 15:22:01 +0900:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v6.16-rc6

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e2291551827fe5d2d3758c435c191d32b6d1350e

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html