From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> The tracefs_cpu_open_mapped() will mmap the ring buffer if it is supported, but it does not unmap it when it is closed. Fixes: 2ed14b59 ("libtracefs: Add ring buffer memory mapping APIs") Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/tracefs-record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tracefs-record.c b/src/tracefs-record.c index f51e18420bc7..4a59c61c195f 100644 --- a/src/tracefs-record.c +++ b/src/tracefs-record.c @@ -276,6 +276,7 @@ void tracefs_cpu_free_fd(struct tracefs_cpu *tcpu) close_fd(tcpu->splice_pipe[0]); close_fd(tcpu->splice_pipe[1]); + trace_unmap(tcpu->mapping); kbuffer_free(tcpu->kbuf); free(tcpu); } -- 2.43.0