Add missing rcu_read_unlock on error paths
[lttng-tools.git] / liblttng-ustconsumer / lttng-ustconsumer.c
index 3c81c32e7d6ca4db5590ca72fd2d8fd65136f8aa..db0ba05bd6a160c691b77eff6fe8808a2032dd45 100644 (file)
@@ -271,6 +271,12 @@ int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)
        if (!chan->handle) {
                return -ENOMEM;
        }
+       /*
+        * The channel fds are passed to ustctl, we only keep a copy.
+        */
+       chan->shm_fd_is_copy = 1;
+       chan->wait_fd_is_copy = 1;
+
        return 0;
 }
 
@@ -298,6 +304,12 @@ int lttng_ustconsumer_allocate_stream(struct lttng_consumer_stream *stream)
        if (!stream->mmap_base) {
                return -EINVAL;
        }
+       /*
+        * The stream fds are passed to ustctl, we only keep a copy.
+        */
+       stream->shm_fd_is_copy = 1;
+       stream->wait_fd_is_copy = 1;
+
        return 0;
 }
 
This page took 0.02311 seconds and 4 git commands to generate.