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.7.0-rc2~41 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=57dc4ef3fcea3490162dde4d09aa8c612b9ad4ad;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 00e86a964..7b36ae252 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1521,13 +1521,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: {