Fix: consumer: double unlock of rcu read lock on error
authorJérémie Galarneau <>
Wed, 16 Oct 2019 16:35:23 +0000 (12:35 -0400)
committerJérémie Galarneau <>
Wed, 16 Oct 2019 18:20:24 +0000 (14:20 -0400)
Commit 6b584c2e changed the implementation of the "trace_chunk_exists"
command to use the then-new "exists" method of the trace chunk
registry. Before this change, the trace chunks were looked-up to check
for their existence.

Since the "exists" method doesn't require the caller to hold the rcu
read lock, it is acquired later on in the function. However, the rcu
read lock is still released on error when this function fails,
resulting in a double-unlock.

Signed-off-by: Jérémie Galarneau <>

index 0086d748f0c6fe17fd54e87ccffdf7384f2ae447..09f0f0983a37cef21893e263d0ab2528b1d709f5 100644 (file)
@@ -4801,7 +4801,7 @@ enum lttcomm_return_code lttng_consumer_trace_chunk_exists(
                /* Internal error. */
                ERR("Failed to query the existence of a trace chunk");
                ret_code = LTTCOMM_CONSUMERD_FATAL;
-               goto end_rcu_unlock;
+               goto end;
        DBG("Trace chunk %s locally",
                        chunk_exists_local ? "exists" : "does not exist");
This page took 0.026445 seconds and 4 git commands to generate.