mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
tracing: Free module_delta on freeing of persistent ring buffer
If a persistent ring buffer is created, a "module_delta" array is also
allocated to hold the module deltas of loaded modules that match modules
in the scratch area. If this buffer gets freed, the module_delta array is
not freed and causes a memory leak.
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250401124525.1f9ac02a@gandalf.local.home
Fixes: 35a380ddbc ("tracing: Show last module text symbols in the stacktrace")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
b81ff11c21
commit
2c9ee74a6d
@@ -9609,6 +9609,7 @@ static void free_trace_buffers(struct trace_array *tr)
|
||||
return;
|
||||
|
||||
free_trace_buffer(&tr->array_buffer);
|
||||
kfree(tr->module_delta);
|
||||
|
||||
#ifdef CONFIG_TRACER_MAX_TRACE
|
||||
free_trace_buffer(&tr->max_buffer);
|
||||
|
||||
Reference in New Issue
Block a user