From ac883ec3865ef6eb92fea65ce3f88eec7da02692 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 5 Dec 2017 15:22:11 -0500 Subject: [PATCH] Clean-up: remove unneeded rcu_read_lock acquisition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit create_channel_per_uid() must already be called while the RCU reader lock is held since the buffer registry is being accessed. The only caller of create_channel_per_uid() is do_create_channel() which, itself, documents that it must be called while holding the RCU read lock. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-app.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 675283aa6..cb5ba6c48 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -2925,7 +2925,6 @@ static int create_channel_per_uid(struct ust_app *app, uint64_t chan_reg_key; struct ust_registry_channel *chan_reg; - rcu_read_lock(); chan_reg_key = ua_chan->tracing_channel_id; pthread_mutex_lock(®_uid->registry->reg.ust->lock); @@ -2946,7 +2945,6 @@ static int create_channel_per_uid(struct ust_app *app, ua_chan->key, LTTNG_DOMAIN_UST, ua_chan->attr.subbuf_size * ua_chan->attr.num_subbuf); - rcu_read_unlock(); if (cmd_ret != LTTNG_OK) { ret = - (int) cmd_ret; ERR("Failed to add channel to notification thread"); -- 2.34.1