summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7567352)
It is forbidden to call lttng_ht_destroy() within a RCU read-side
critical section.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct relay_session *session =
caa_container_of(rcu_head, struct relay_session,
rcu_node);
struct relay_session *session =
caa_container_of(rcu_head, struct relay_session,
rcu_node);
+ /*
+ * Since each trace has a reference on the session, it means
+ * that if we are at the point where we teardown the session, no
+ * trace belonging to that session exist at this point.
+ * Calling lttng_ht_destroy in call_rcu worker thread so we
+ * don't hold the RCU read-side lock while calling it.
+ */
+ lttng_ht_destroy(session->ctf_traces_ht);
ret = session_delete(session);
assert(!ret);
ret = session_delete(session);
assert(!ret);
- /*
- * Since each trace has a reference on the session, it means
- * that if we are at the point where we teardown the session, no
- * trace belonging to that session exist at this point.
- */
- lttng_ht_destroy(session->ctf_traces_ht);
call_rcu(&session->rcu_node, rcu_destroy_session);
}
call_rcu(&session->rcu_node, rcu_destroy_session);
}
static void stream_destroy(struct relay_stream *stream)
{
if (stream->indexes_ht) {
static void stream_destroy(struct relay_stream *stream)
{
if (stream->indexes_ht) {
+ /*
+ * Calling lttng_ht_destroy in call_rcu worker thread so
+ * we don't hold the RCU read-side lock while calling
+ * it.
+ */
lttng_ht_destroy(stream->indexes_ht);
}
if (stream->tfa) {
lttng_ht_destroy(stream->indexes_ht);
}
if (stream->tfa) {