* [GIT PULL] probes: Fixes for v6.13-rc6
@ 2025-01-12 3:44 Masami Hiramatsu
2025-01-12 20:08 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2025-01-12 3:44 UTC (permalink / raw)
To: Linus Torvalds
Cc: Masami Hiramatsu, Steven Rostedt, Masami Hiramatsu, linux-kernel
Hi Linus,
Probes fixes for v6.13-rc6:
- tracing/kprobes: Fix to free trace_kprobe objects at a failure path
in __trace_kprobe_create() function. This fixes a memory leak.
Please pull the latest probes-fixes-v6.13-rc6 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.13-rc6
Tag SHA1: 34f0f018d7a3ef1a99d316dd0f4854410f6cc8e7
Head SHA1: 30c8fd31c571db486a5331a92d03eb60a0fb277c
Masami Hiramatsu (Google) (1):
tracing/kprobes: Fix to free objects when failed to copy a symbol
----
kernel/trace/trace_kprobe.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---------------------------
commit 30c8fd31c571db486a5331a92d03eb60a0fb277c
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: Thu Jan 9 23:29:37 2025 +0900
tracing/kprobes: Fix to free objects when failed to copy a symbol
In __trace_kprobe_create(), if something fails it must goto error block
to free objects. But when strdup() a symbol, it returns without that.
Fix it to goto the error block to free objects correctly.
Link: https://lore.kernel.org/all/173643297743.1514810.2408159540454241947.stgit@devnote2/
Fixes: 6212dd29683e ("tracing/kprobes: Use dyn_event framework for kprobe events")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 935a886af40c..0642ea174849 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -940,8 +940,10 @@ static int __trace_kprobe_create(int argc, const char *argv[])
}
/* a symbol specified */
symbol = kstrdup(argv[1], GFP_KERNEL);
- if (!symbol)
- return -ENOMEM;
+ if (!symbol) {
+ ret = -ENOMEM;
+ goto error;
+ }
tmp = strchr(symbol, '%');
if (tmp) {
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [GIT PULL] probes: Fixes for v6.13-rc6
2025-01-12 3:44 [GIT PULL] probes: Fixes for v6.13-rc6 Masami Hiramatsu
@ 2025-01-12 20:08 ` pr-tracker-bot
0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2025-01-12 20:08 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Linus Torvalds, Masami Hiramatsu (Google),
Steven Rostedt, Masami Hiramatsu, linux-kernel
The pull request you sent on Sun, 12 Jan 2025 12:44:31 +0900:
> git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v6.13-rc6
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a87d1203bb232a2bec674879b62f87322b20c2c8
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-12 20:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-12 3:44 [GIT PULL] probes: Fixes for v6.13-rc6 Masami Hiramatsu
2025-01-12 20:08 ` 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®