projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: add RHEL version macros
[lttng-modules.git]
/
lib
/
ringbuffer
/
ring_buffer_backend.c
diff --git
a/lib/ringbuffer/ring_buffer_backend.c
b/lib/ringbuffer/ring_buffer_backend.c
index f7ed20df19869b767fd23f568c87e5831956ead2..3cc22d77b2d9ad5c2ed428fed783b9055a5f97d3 100644
(file)
--- a/
lib/ringbuffer/ring_buffer_backend.c
+++ b/
lib/ringbuffer/ring_buffer_backend.c
@@
-331,6
+331,12
@@
int channel_backend_init(struct channel_backend *chanb,
return -EINVAL;
if (!num_subbuf || (num_subbuf & (num_subbuf - 1)))
return -EINVAL;
return -EINVAL;
if (!num_subbuf || (num_subbuf & (num_subbuf - 1)))
return -EINVAL;
+ /*
+ * Overwrite mode buffers require at least 2 subbuffers per
+ * buffer.
+ */
+ if (config->mode == RING_BUFFER_OVERWRITE && num_subbuf < 2)
+ return -EINVAL;
ret = subbuffer_id_check_index(config, num_subbuf);
if (ret)
ret = subbuffer_id_check_index(config, num_subbuf);
if (ret)
This page took
0.025129 seconds
and
4
git commands to generate.