mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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:ea908a2b79("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:5d6919055dSigned-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
96350db80e
commit
55a0005518
|
|
@ -110,9 +110,9 @@ static struct trace_buffer_desc *remote_test_load(unsigned long size, void *unus
|
|||
return remote_test_buffer_desc;
|
||||
|
||||
err_unload:
|
||||
for_each_ring_buffer_desc(rb_desc, cpu, remote_test_buffer_desc)
|
||||
for_each_ring_buffer_desc(rb_desc, cpu, desc)
|
||||
remote_test_unload_simple_rb(rb_desc->cpu);
|
||||
trace_remote_free_buffer(remote_test_buffer_desc);
|
||||
trace_remote_free_buffer(desc);
|
||||
|
||||
err_free_desc:
|
||||
kfree(desc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user