Enforce documented RCU preconditions with assertions
[lttng-tools.git] / src / bin / lttng-sessiond / snapshot.cpp
index 44928edb06aaa78b13198fd7f4811fb3870155f3..727dc5db8967bad758a7ac11ed4d6611967cb2d7 100644 (file)
@@ -241,6 +241,7 @@ struct snapshot_output *snapshot_find_output_by_name(const char *name,
 
        LTTNG_ASSERT(snapshot);
        LTTNG_ASSERT(name);
+       ASSERT_RCU_READ_LOCKED();
 
        cds_lfht_for_each_entry(snapshot->output_ht->ht, &iter.iter, output,
                node.node) {
@@ -267,6 +268,7 @@ struct snapshot_output *snapshot_find_output_by_id(uint32_t id,
        struct snapshot_output *output = NULL;
 
        LTTNG_ASSERT(snapshot);
+       ASSERT_RCU_READ_LOCKED();
 
        lttng_ht_lookup(snapshot->output_ht, (void *)((unsigned long) id), &iter);
        node = lttng_ht_iter_get_node_ulong(&iter);
This page took 0.024698 seconds and 4 git commands to generate.