Skip to content

Commit 9ba0e17

Browse files
committed
ring-buffer: Unlock resize on mmap error
Memory mapping the tracing ring buffer will disable resizing the buffer. But if there's an error in the memory mapping like an invalid parameter, the function exits out without re-enabling the resizing of the ring buffer, preventing the ring buffer from being resized after that. Cc: [email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Vincent Donnefort <[email protected]> Link: https://lore.kernel.org/[email protected] Fixes: 117c392 ("ring-buffer: Introducing ring-buffer mapping functions") Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent a64dcfb commit 9ba0e17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/trace/ring_buffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7126,6 +7126,7 @@ int ring_buffer_map(struct trace_buffer *buffer, int cpu,
71267126
kfree(cpu_buffer->subbuf_ids);
71277127
cpu_buffer->subbuf_ids = NULL;
71287128
rb_free_meta_page(cpu_buffer);
7129+
atomic_dec(&cpu_buffer->resize_disabled);
71297130
}
71307131

71317132
unlock:

0 commit comments

Comments
 (0)