Fix: missing RCU read side critical sections
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Jan 2022 22:59:46 +0000 (17:59 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Jan 2022 22:59:46 +0000 (17:59 -0500)
Based on the comments of the called functions.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ica81b648ce88290c4ca7507fb00a78480457cf01

src/bin/lttng-sessiond/event.c

index bfca8be6bba17372efa7c2762e4c428374bf5bc0..89510294ef0edb66c3f924a33735801960c38d74 100644 (file)
@@ -471,6 +471,7 @@ static int agent_enable(struct agent *agt,
        assert(event);
        assert(agt);
 
+       rcu_read_lock();
        aevent = agent_find_event(event->name, event->loglevel_type,
                        event->loglevel, filter_expression, agt);
        if (!aevent) {
@@ -519,6 +520,7 @@ error:
                agent_destroy_event(aevent);
        }
 end:
+       rcu_read_unlock();
        free(filter);
        free(filter_expression);
        return ret;
This page took 0.027519 seconds and 5 git commands to generate.