projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: validate buffer type for UST channel creation
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
channel.c
diff --git
a/src/bin/lttng-sessiond/channel.c
b/src/bin/lttng-sessiond/channel.c
index 1621bc626bba7d72b52098b8c1798ee859d80c70..bb5b3d1de32cc00c19cba668a060d26982dc774f 100644
(file)
--- a/
src/bin/lttng-sessiond/channel.c
+++ b/
src/bin/lttng-sessiond/channel.c
@@
-282,6
+282,16
@@
int channel_ust_create(struct ltt_ust_session *usess,
goto error;
}
goto error;
}
+ /* Validate buffer type. */
+ switch (type) {
+ case LTTNG_BUFFER_PER_PID:
+ case LTTNG_BUFFER_PER_UID:
+ break;
+ default:
+ ret = LTTNG_ERR_BUFFER_NOT_SUPPORTED;
+ goto error;
+ }
+
/* Create UST channel */
uchan = trace_ust_create_channel(attr, usess->pathname);
if (uchan == NULL) {
/* Create UST channel */
uchan = trace_ust_create_channel(attr, usess->pathname);
if (uchan == NULL) {
This page took
0.038665 seconds
and
4
git commands to generate.