Skip to content

Commit 328987a

Browse files
rostedtmehmetb0
authored andcommitted
ring-buffer: Unlock resize on mmap error
BugLink: https://bugs.launchpad.net/bugs/2104873 commit 9ba0e17 upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Noah Wager <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent c614180 commit 328987a

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
@@ -6423,6 +6423,7 @@ int ring_buffer_map(struct trace_buffer *buffer, int cpu,
64236423
kfree(cpu_buffer->subbuf_ids);
64246424
cpu_buffer->subbuf_ids = NULL;
64256425
rb_free_meta_page(cpu_buffer);
6426+
atomic_dec(&cpu_buffer->resize_disabled);
64266427
}
64276428

64286429
unlock:

0 commit comments

Comments
 (0)