X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-registry.c;h=6e9f0699b334bbeebb00957b0e9a9b0bd486ea1b;hp=399d48f681d8e0aa22bd269109e580f0e2206d77;hb=0b2dc8df2a6d7b3341a72a04767dd6328907c97c;hpb=4950b860f76b938833046793e7221c11e8e89682 diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c index 399d48f68..6e9f0699b 100644 --- a/src/bin/lttng-sessiond/ust-registry.c +++ b/src/bin/lttng-sessiond/ust-registry.c @@ -23,6 +23,7 @@ #include #include "ust-registry.h" +#include "utils.h" /* * Hash table match function for event in the registry. @@ -310,9 +311,9 @@ void ust_registry_destroy_event(struct ust_registry_channel *chan, /* * We need to execute ht_destroy outside of RCU read-side critical - * section, so we postpone its execution using call_rcu. It is simpler - * than to change the semantic of the many callers of - * destroy_channel(). + * section and outside of call_rcu thread, so we postpone its execution + * using ht_cleanup_push. It is simpler than to change the semantic of + * the many callers of delete_ust_app_session(). */ static void destroy_channel_rcu(struct rcu_head *head) @@ -321,7 +322,7 @@ void destroy_channel_rcu(struct rcu_head *head) caa_container_of(head, struct ust_registry_channel, rcu_head); if (chan->ht) { - lttng_ht_destroy(chan->ht); + ht_cleanup_push(chan->ht); } free(chan); } @@ -552,7 +553,7 @@ void ust_registry_session_destroy(struct ust_registry_session *reg) rcu_read_unlock(); if (reg->channels) { - lttng_ht_destroy(reg->channels); + ht_cleanup_push(reg->channels); } free(reg->metadata); }