From: Mathieu Desnoyers Date: Mon, 7 Sep 2015 14:36:09 +0000 (-0400) Subject: Fix: unbalanced RCU read-side lock in enable event command X-Git-Tag: v2.8.0-rc1~363 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f5ac4bd72b128dc3e6e5d41d3f76755e6215a02d;p=lttng-tools.git Fix: unbalanced RCU read-side lock in enable event command The event validation fails, an unpaired RCU unlock is performed, thus underflowing the RCU nesting counter. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 26845535c..058dbae4d 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1535,13 +1535,13 @@ static int _cmd_enable_event(struct ltt_session *session, DBG("Enable event command for event \'%s\'", event->name); + rcu_read_lock(); + ret = validate_event_name(event->name); if (ret) { goto error; } - rcu_read_lock(); - switch (domain->type) { case LTTNG_DOMAIN_KERNEL: {