Fix: handle large number of pages or subbuffers per buffer
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Sep 2016 22:08:15 +0000 (18:08 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Sep 2016 22:15:11 +0000 (18:15 -0400)
commit6e4fc6f36d68fb3c8d40113f8670eb6e9c8ffd76
treeadaab7414dc661b20bda528ffa5e3e28c1f78b01
parent54af4470d6bbd06b28a631c74d228e3ffaeaedad
Fix: handle large number of pages or subbuffers per buffer

Do no trigger kernel console warnings when we try to allocate too many
pages, or a too large kmalloc area for page array (within a subbuffer),
or a sub-buffer array (within a buffer).

Use vmalloc/vfree for the "pages" local variable used only during
allocation, which is an array of nr_subbuf * nr_pages_per_subbuf
pointers. This ensures we do not limit the overall buffer size due to
kmalloc limitations.

Fixes #1031

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/ring_buffer_backend.c
lib/ringbuffer/ring_buffer_frontend.c
This page took 0.02701 seconds and 4 git commands to generate.