Thread (9 messages) 9 messages, 3 authors, 2023-07-15

Re: [PATCH 2/2] tracing: Add free_trace_iter_content() helper function

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-07-14 14:22:24
Also in: lkml

On Fri, 14 Jul 2023 17:47:57 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
@@ -6709,7 +6723,12 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)
 	}
 
 	trace_seq_init(&iter->seq);
-	iter->trace = tr->current_trace;
+
+	iter->trace = kzalloc(sizeof(*iter->trace), GFP_KERNEL);
+	if (!iter->trace)
+		goto fail;
+
+	*iter->trace = *tr->current_trace;  
Hmm, you allocate iter->trace here (again)
Bah, that looks like it got out of sync with the previous patch (which
removed that). That's not suppose to be there.

I'll fix this an send out a v2. Thanks for catching that!

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