Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 35a380ddbc65 ("tracing: Show last module text symbols in the stacktrace")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

+1
+1
kernel/trace/trace.c
··· 9609 9609 return; 9610 9610 9611 9611 free_trace_buffer(&tr->array_buffer); 9612 + kfree(tr->module_delta); 9612 9613 9613 9614 #ifdef CONFIG_TRACER_MAX_TRACE 9614 9615 free_trace_buffer(&tr->max_buffer);