While the notification subsystem all runs within a single thread,
the iteration over the triggers hash table must be protected using
the RCU read-side lock since the RCU worker may resize the hash
table while the iteration is performed.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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;
}