projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Missing rcu_read_lock in cmd_snapshot_list_outputs()
[lttng-tools.git]
/
src
/
common
/
kernel-consumer
/
kernel-consumer.c
diff --git
a/src/common/kernel-consumer/kernel-consumer.c
b/src/common/kernel-consumer/kernel-consumer.c
index 57dc2ba6a76767d623c62fc552cb413fd0a0e71f..027aa6975accde948c5fa81de5c82d36b0f55b38 100644
(file)
--- a/
src/common/kernel-consumer/kernel-consumer.c
+++ b/
src/common/kernel-consumer/kernel-consumer.c
@@
-562,7
+562,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
* happens while tearing down.
*/
ERR("Unable to find channel key %" PRIu64, msg.u.stream.channel_key);
* happens while tearing down.
*/
ERR("Unable to find channel key %" PRIu64, msg.u.stream.channel_key);
- ret_code = LTT
NG_ERR_KERN
_CHAN_NOT_FOUND;
+ ret_code = LTT
COMM_CONSUMERD
_CHAN_NOT_FOUND;
}
health_code_update();
}
health_code_update();
@@
-642,6
+642,10
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
switch (channel->output) {
case CONSUMER_CHANNEL_SPLICE:
new_stream->output = LTTNG_EVENT_SPLICE;
switch (channel->output) {
case CONSUMER_CHANNEL_SPLICE:
new_stream->output = LTTNG_EVENT_SPLICE;
+ ret = utils_create_pipe(new_stream->splice_pipe);
+ if (ret < 0) {
+ goto end_nosignal;
+ }
break;
case CONSUMER_CHANNEL_MMAP:
new_stream->output = LTTNG_EVENT_MMAP;
break;
case CONSUMER_CHANNEL_MMAP:
new_stream->output = LTTNG_EVENT_MMAP;
@@
-765,7
+769,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
*/
ERR("Unable to find channel key %" PRIu64,
msg.u.sent_streams.channel_key);
*/
ERR("Unable to find channel key %" PRIu64,
msg.u.sent_streams.channel_key);
- ret_code = LTT
NG_ERR_KERN
_CHAN_NOT_FOUND;
+ ret_code = LTT
COMM_CONSUMERD
_CHAN_NOT_FOUND;
}
health_code_update();
}
health_code_update();
@@
-774,7
+778,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
* Send status code to session daemon.
*/
ret = consumer_send_status_msg(sock, ret_code);
* Send status code to session daemon.
*/
ret = consumer_send_status_msg(sock, ret_code);
- if (ret < 0) {
+ if (ret < 0
|| ret_code != LTTCOMM_CONSUMERD_SUCCESS
) {
/* Somehow, the session daemon is not responding anymore. */
goto end_nosignal;
}
/* Somehow, the session daemon is not responding anymore. */
goto end_nosignal;
}
@@
-816,7
+820,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
relayd = consumer_find_relayd(index);
if (relayd == NULL) {
DBG("Unable to find relayd %" PRIu64, index);
relayd = consumer_find_relayd(index);
if (relayd == NULL) {
DBG("Unable to find relayd %" PRIu64, index);
- ret_code = LTT
NG_ERR_NO_CONSUMER
;
+ ret_code = LTT
COMM_CONSUMERD_RELAYD_FAIL
;
}
/*
}
/*
@@
-875,7
+879,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
msg.u.snapshot_channel.relayd_id, ctx);
if (ret < 0) {
ERR("Snapshot metadata failed");
msg.u.snapshot_channel.relayd_id, ctx);
if (ret < 0) {
ERR("Snapshot metadata failed");
- ret_code = LTT
NG_ERR_KERN_META_FAIL
;
+ ret_code = LTT
COMM_CONSUMERD_ERROR_METADATA
;
}
} else {
ret = lttng_kconsumer_snapshot_channel(msg.u.snapshot_channel.key,
}
} else {
ret = lttng_kconsumer_snapshot_channel(msg.u.snapshot_channel.key,
@@
-885,7
+889,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
ctx);
if (ret < 0) {
ERR("Snapshot channel failed");
ctx);
if (ret < 0) {
ERR("Snapshot channel failed");
- ret_code = LTT
NG_ERR_KERN_CHAN_FAIL
;
+ ret_code = LTT
COMM_CONSUMERD_CHAN_NOT_FOUND
;
}
}
}
}
@@
-906,7
+910,7
@@
int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
channel = consumer_find_channel(key);
if (!channel) {
ERR("Kernel consumer destroy channel %" PRIu64 " not found", key);
channel = consumer_find_channel(key);
if (!channel) {
ERR("Kernel consumer destroy channel %" PRIu64 " not found", key);
- ret_code = LTT
NG_ERR_KERN
_CHAN_NOT_FOUND;
+ ret_code = LTT
COMM_CONSUMERD
_CHAN_NOT_FOUND;
}
health_code_update();
}
health_code_update();
This page took
0.025664 seconds
and
4
git commands to generate.