Add missing rcu_read_unlock on error paths
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 5 Nov 2011 15:31:24 +0000 (11:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 5 Nov 2011 15:31:24 +0000 (11:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-sessiond/context.c
lttng-sessiond/ust-consumer.c

index d93a2895d2d3318a1cfb6291ec838c02020915b5..732dc929d55ca8a1fa81dcab50bc31dc438c5f80 100644 (file)
@@ -260,12 +260,14 @@ static int add_ustctx_all_channels(struct ltt_ust_session *ustsession,
                        //              ustctx, ustchan->obj, &context_data);
                        if (ret < 0) {
                                ret = LTTCOMM_UST_CONTEXT_FAIL;
+                               rcu_read_unlock();
                                goto error;
                        }
                } else {
                        ret = add_ustctx_to_event(ustsession, ustctx, ustchan, event_name);
                        if (ret < 0) {
                                ret = LTTCOMM_UST_CONTEXT_FAIL;
+                               rcu_read_unlock();
                                goto error;
                        } else if (ret == 1) {
                                /* Event found and context added */
index 444ff6eeea9f6b79c1c93259890927b52a27bf28..b83fcc435f8aaf9ced379aa3fd512572b5aa502f 100644 (file)
@@ -171,6 +171,7 @@ int ust_consumer_send_session(int consumer_fd, struct ust_app_session *usess)
 
                ret = send_channel_streams(sock, uchan);
                if (ret < 0) {
+                       rcu_read_unlock();
                        goto error;
                }
                hashtable_get_next(usess->channels, &iter);
This page took 0.026945 seconds and 4 git commands to generate.