summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fdd9eb1)
Trace UST channel and event were not protected by RCU lock when calling
their find function. Furthermore, the event lookup was not protected at
all during and after the lookup.
Signed-off-by: David Goulet <dgoulet@efficios.com>
usess = session->ust_session;
usess = session->ust_session;
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
DBG("Enabling channel %s for session %s", attr->name, session->name);
DBG("Enabling channel %s for session %s", attr->name, session->name);
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
assert(event);
assert(channel_name);
assert(event);
assert(channel_name);
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
assert(session);
assert(channel_name);
assert(session);
assert(channel_name);
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
{
assert(ctx);
assert(channel_name);
assert(ctx);
assert(channel_name);
/*
* Define which channel's hashtable to use from the domain or quit if
* unknown domain.
/*
* Define which channel's hashtable to use from the domain or quit if
* unknown domain.
- * Find the channel in the hashtable.
+ * Find the channel in the hashtable and return channel pointer. RCU read side
+ * lock MUST be acquired before calling this.
*/
struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
char *name)
*/
struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
char *name)
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
lttng_ht_lookup(ht, (void *)name, &iter);
node = lttng_ht_iter_get_node_str(&iter);
if (node == NULL) {
lttng_ht_lookup(ht, (void *)name, &iter);
node = lttng_ht_iter_get_node_str(&iter);
if (node == NULL) {
DBG2("Trace UST channel %s found by name", name);
DBG2("Trace UST channel %s found by name", name);
- * Find the event in the hashtable.
+ * Find the event in the hashtable and return event pointer. RCU read side lock
+ * MUST be acquired before calling this.
*/
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
char *name, struct lttng_filter_bytecode *filter, int loglevel)
*/
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
char *name, struct lttng_filter_bytecode *filter, int loglevel)