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 12:21:36 +0000 (08:21 -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 26845535c32f7af3805ed59bced52e2864307e21..058dbae4d894955480526b631e5b76b212765dd5 100644 (file)
@@ -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:
        {
This page took 0.027466 seconds and 4 git commands to generate.