Skip to content

Commit 55a0005

Browse files
vdonnefortrostedt
authored andcommitted
tracing: Fix desc in error path for the trace remote test module
During initialisation in remote_test_load(), if one of the simple_ring_buffer fails to initialise, the error path attempts to rollback initialised buffers. However, the rollback incorrectly uses the global pointer to the trace descriptor, which is only set upon successful load completion. Fix the error path by using the local pointer to the descriptor. Link: https://patch.msgid.link/20260515201616.337469-1-vdonnefort@google.com Fixes: ea908a2 ("tracing: Add a trace remote module for testing") Reported-by: Sashiko <sashiko-bot@kernel.org> Signed-off-by: Vincent Donnefort <vdonnefort@google.com> base-commit: 5d69190 Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 96350db commit 55a0005

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/trace/remote_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ static struct trace_buffer_desc *remote_test_load(unsigned long size, void *unus
110110
return remote_test_buffer_desc;
111111

112112
err_unload:
113-
for_each_ring_buffer_desc(rb_desc, cpu, remote_test_buffer_desc)
113+
for_each_ring_buffer_desc(rb_desc, cpu, desc)
114114
remote_test_unload_simple_rb(rb_desc->cpu);
115-
trace_remote_free_buffer(remote_test_buffer_desc);
115+
trace_remote_free_buffer(desc);
116116

117117
err_free_desc:
118118
kfree(desc);

0 commit comments

Comments
 (0)