channels_ht_node) {
struct lttng_trigger_list_element *trigger_list_element;
struct lttng_channel_trigger_list *trigger_list;
+ struct cds_lfht_iter lookup_iter;
if (!trigger_applies_to_channel(trigger, channel)) {
continue;
hash_channel_key(&channel->key),
match_channel_trigger_list,
&channel->key,
- &iter);
- node = cds_lfht_iter_get_node(&iter);
+ &lookup_iter);
+ node = cds_lfht_iter_get_node(&lookup_iter);
assert(node);
trigger_list = caa_container_of(node,
struct lttng_channel_trigger_list,
struct notification_thread_command *cmd;
/* Read the event pipe to put it back into a quiescent state. */
- ret = read(lttng_pipe_get_readfd(handle->cmd_queue.event_pipe), &counter,
+ ret = lttng_read(lttng_pipe_get_readfd(handle->cmd_queue.event_pipe), &counter,
sizeof(counter));
- if (ret == -1) {
+ if (ret != sizeof(counter)) {
goto error;
}
struct cds_lfht_iter iter;
struct lttng_trigger_ht_element *trigger_ht_element;
+ rcu_read_lock();
cds_lfht_for_each_entry(state->triggers_ht, &iter, trigger_ht_element,
node) {
int ret = handle_notification_thread_command_unregister_trigger(
error_occurred = true;
}
}
+ rcu_read_unlock();
return error_occurred ? -1 : 0;
}