Thread (13 messages) 13 messages, 2 authors, 2025-01-09

Re: [PATCH v5 1/5] tracing/kprobes: Fix to free objects when failed to copy a symbol

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-01-08 15:07:05
Also in: lkml

On Wed,  8 Jan 2025 11:10:46 +0900
"Masami Hiramatsu (Google)" [off-list ref] wrote:
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>

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.

Fixes: 6212dd29683e ("tracing/kprobes: Use dyn_event framework for kprobe events")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
 kernel/trace/trace_kprobe.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help