projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: missing RCU read side critical sections
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
trace-ust.cpp
diff --git
a/src/bin/lttng-sessiond/trace-ust.cpp
b/src/bin/lttng-sessiond/trace-ust.cpp
index 0f303bf035a5db4e80c3bf8953aedc08174d31e8..f3303efd7c1a55980541e39253cfb5b7d1e34b41 100644
(file)
--- a/
src/bin/lttng-sessiond/trace-ust.cpp
+++ b/
src/bin/lttng-sessiond/trace-ust.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2011
David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011
EfficiOS Inc.
* Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
* SPDX-License-Identifier: GPL-2.0-only
@@
-167,6
+167,7
@@
struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
+ ASSERT_RCU_READ_LOCKED();
/*
* If we receive an empty string for channel name, it means the
* default channel name is requested.
/*
* If we receive an empty string for channel name, it means the
* default channel name is requested.
@@
-204,6
+205,7
@@
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
LTTNG_ASSERT(name);
LTTNG_ASSERT(ht);
LTTNG_ASSERT(name);
LTTNG_ASSERT(ht);
+ ASSERT_RCU_READ_LOCKED();
key.name = name;
key.filter = filter;
key.name = name;
key.filter = filter;
@@
-329,8
+331,8
@@
error:
process_attr_tracker_destroy(lus->tracker_vpid);
process_attr_tracker_destroy(lus->tracker_vuid);
process_attr_tracker_destroy(lus->tracker_vgid);
process_attr_tracker_destroy(lus->tracker_vpid);
process_attr_tracker_destroy(lus->tracker_vuid);
process_attr_tracker_destroy(lus->tracker_vgid);
-
ht_cleanup_push
(lus->domain_global.channels);
-
ht_cleanup_push
(lus->agents);
+
lttng_ht_destroy
(lus->domain_global.channels);
+
lttng_ht_destroy
(lus->agents);
free(lus);
error_alloc:
return NULL;
free(lus);
error_alloc:
return NULL;
@@
-774,7
+776,7
@@
static void fini_id_tracker(struct ust_id_tracker *id_tracker)
destroy_id_tracker_node(tracker_node);
}
rcu_read_unlock();
destroy_id_tracker_node(tracker_node);
}
rcu_read_unlock();
-
ht_cleanup_push
(id_tracker->ht);
+
lttng_ht_destroy
(id_tracker->ht);
id_tracker->ht = NULL;
}
id_tracker->ht = NULL;
}
@@
-1231,7
+1233,7
@@
static void destroy_contexts(struct lttng_ht *ht)
}
rcu_read_unlock();
}
rcu_read_unlock();
-
ht_cleanup_push
(ht);
+
lttng_ht_destroy
(ht);
}
/*
}
/*
@@
-1294,7
+1296,7
@@
static void destroy_events(struct lttng_ht *events)
}
rcu_read_unlock();
}
rcu_read_unlock();
-
ht_cleanup_push
(events);
+
lttng_ht_destroy
(events);
}
/*
}
/*
@@
-1371,7
+1373,7
@@
static void destroy_channels(struct lttng_ht *channels)
}
rcu_read_unlock();
}
rcu_read_unlock();
-
ht_cleanup_push
(channels);
+
lttng_ht_destroy
(channels);
}
/*
}
/*
@@
-1387,8
+1389,6
@@
static void destroy_domain_global(struct ltt_ust_domain_global *dom)
/*
* Cleanup ust session structure, keeping data required by
* destroy notifier.
/*
* Cleanup ust session structure, keeping data required by
* destroy notifier.
- *
- * Should *NOT* be called with RCU read-side lock held.
*/
void trace_ust_destroy_session(struct ltt_ust_session *session)
{
*/
void trace_ust_destroy_session(struct ltt_ust_session *session)
{
@@
-1412,7
+1412,7
@@
void trace_ust_destroy_session(struct ltt_ust_session *session)
}
rcu_read_unlock();
}
rcu_read_unlock();
-
ht_cleanup_push
(session->agents);
+
lttng_ht_destroy
(session->agents);
/* Cleanup UID buffer registry object(s). */
cds_list_for_each_entry_safe(reg, sreg, &session->buffer_reg_uid_list,
/* Cleanup UID buffer registry object(s). */
cds_list_for_each_entry_safe(reg, sreg, &session->buffer_reg_uid_list,
This page took
0.029569 seconds
and
4
git commands to generate.