* [GIT PULL] probes: Fixes for v6.9-rc1
@ 2024-03-27 14:23 Masami Hiramatsu
2024-03-27 17:05 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2024-03-27 14:23 UTC (permalink / raw)
To: Linus Torvalds
Cc: Masami Hiramatsu, Steven Rostedt, Masami Hiramatsu, linux-kernel
Hi Linus,
Probes fixes for v6.9-rc1:
- tracing/probes: initialize a 'val' local variable with zero. This variable
is read by FETCH_OP_ST_EDATA in a loop, and is expected to be initialized
by FETCH_OP_ARG in the same loop. Since this expectation is not obvious,
thus smatch warns it. Initializing 'val' with zero fixes this warning.
Please pull the latest probes-fixes-v6.9-rc1 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.9-rc1
Tag SHA1: f7e169092950bdda7a36a77325e3490700668a66
Head SHA1: 0add699ad068d26e5b1da9ff28b15461fc4005df
Masami Hiramatsu (Google) (1):
tracing: probes: Fix to zero initialize a local variable
----
kernel/trace/trace_probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 0add699ad068d26e5b1da9ff28b15461fc4005df
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: Wed Mar 20 17:10:38 2024 +0900
tracing: probes: Fix to zero initialize a local variable
Fix to initialize 'val' local variable with zero.
Dan reported that Smatch static code checker reports an error that a local
'val' variable needs to be initialized. Actually, the 'val' is expected to
be initialized by FETCH_OP_ARG in the same loop, but it is not obvious. So
initialize it with zero.
Link: https://lore.kernel.org/all/171092223833.237219.17304490075697026697.stgit@devnote2/
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/b010488e-68aa-407c-add0-3e059254aaa0@moroto.mountain/
Fixes: 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)")
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 217169de0920..dfe3ee6035ec 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -839,7 +839,7 @@ int traceprobe_get_entry_data_size(struct trace_probe *tp)
void store_trace_entry_data(void *edata, struct trace_probe *tp, struct pt_regs *regs)
{
struct probe_entry_arg *earg = tp->entry_arg;
- unsigned long val;
+ unsigned long val = 0;
int i;
if (!earg)
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-27 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 14:23 [GIT PULL] probes: Fixes for v6.9-rc1 Masami Hiramatsu
2024-03-27 17:05 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®