From 57dc4ef3fcea3490162dde4d09aa8c612b9ad4ad Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 7 Sep 2015 10:36:09 -0400 Subject: [PATCH] Fix: unbalanced RCU read-side lock in enable event command MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: { -- 2.34.1