From: Mathieu Desnoyers Date: Sat, 5 Nov 2011 15:31:24 +0000 (-0400) Subject: Add missing rcu_read_unlock on error paths X-Git-Tag: v2.0-pre15~155 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5485f82241185e6703fe343704c48d2a6d6a4b46;p=lttng-tools.git Add missing rcu_read_unlock on error paths Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-sessiond/context.c b/lttng-sessiond/context.c index d93a2895d..732dc929d 100644 --- a/lttng-sessiond/context.c +++ b/lttng-sessiond/context.c @@ -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 */ diff --git a/lttng-sessiond/ust-consumer.c b/lttng-sessiond/ust-consumer.c index 444ff6eee..b83fcc435 100644 --- a/lttng-sessiond/ust-consumer.c +++ b/lttng-sessiond/ust-consumer.c @@ -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);