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:16:55 +0000 (18:16 -0400)
commit9778aa3c49b0c98f05b10f2780821ac18b6df1b1
treedb8a15a4803fe9d931c4adf65914b05acaf21252
parent364754c1f9e7c6237fe7627e701fa543d60ca353
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.025072 seconds and 4 git commands to generate.