From: Jérémie Galarneau Date: Fri, 28 Jan 2022 22:59:46 +0000 (-0500) Subject: Fix: missing RCU read side critical sections X-Git-Tag: v2.13.5~58 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6ba36f78b2d1b3ca1dd6e544183bac92915e788f;p=lttng-tools.git Fix: missing RCU read side critical sections Based on the comments of the called functions. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: Ica81b648ce88290c4ca7507fb00a78480457cf01 --- diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index bfca8be6b..89510294e 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -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;