projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Return error if subbuffer size is lower than a page
[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 2ddb9f991bc9cc763e9008c8237683ba38edb542..332a1d23ae46fef3484670d9b4c8c7e6ad252b31 100644
(file)
--- a/
lib/ringbuffer/ring_buffer_backend.c
+++ b/
lib/ringbuffer/ring_buffer_backend.c
@@
-311,7
+311,8
@@
int channel_backend_init(struct channel_backend *chanb,
return -EPERM;
/* Check that the subbuffer size is larger than a page. */
- CHAN_WARN_ON(chanb, subbuf_size < PAGE_SIZE);
+ if (subbuf_size < PAGE_SIZE)
+ return -EINVAL;
/*
* Make sure the number of subbuffers and subbuffer size are power of 2.
This page took
0.02354 seconds
and
4
git commands to generate.