Fix: unbalanced RCU read-side lock in enable event command
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 Sep 2015 14:36:09 +0000 (10:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Sep 2015 14:01:11 +0000 (10:01 -0400)
The event validation fails, an unpaired RCU unlock is performed, thus
underflowing the RCU nesting counter.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index 00e86a9642952be99d88aa3404a3d13090e442eb..7b36ae252a4660a29291472fcfbf80d57aabc3dc 100644 (file)
@@ -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:
        {
This page took 0.027672 seconds and 4 git commands to generate.