Thread (4 messages) 4 messages, 3 authors, 2025-03-19

Re: [RFC PATCH] tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-03-19 09:13:24
Also in: lkml

On Tue, 18 Mar 2025 11:07:00 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -790,7 +790,7 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
 				clear_bit(EVENT_FILE_FL_RECORDED_TGID_BIT, &file->flags);
 			}
 
-			call->class->reg(call, TRACE_REG_UNREGISTER, file);
+			ret = call->class->reg(call, TRACE_REG_UNREGISTER, file);  
This is not enough. As same as enable failure, this function needs to handle
this error to report it and break.
Perhaps all we should do here is:

			WARN_ON_ONCE(ret);

-- 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