- rcu_read_lock();
- /*
- * We are protected against the addition of new events by the session
- * list lock being held.
- */
- cds_lfht_for_each_entry(the_trigger_agents_ht_by_domain->ht,
- &iter.iter, trigger_agent, node.node) {
- agent_update(trigger_agent, app);
+ {
+ /*
+ * We are protected against the addition of new events by the session
+ * list lock being held.
+ */
+ lttng::urcu::read_lock_guard read_lock;
+
+ cds_lfht_for_each_entry (
+ the_trigger_agents_ht_by_domain->ht, &iter.iter, trigger_agent, node.node) {
+ agent_update(trigger_agent, app);
+ }