Fix: handle concurrent flush vs get_next_subbuf on metadata cache
[lttng-modules.git] / lttng-abi.c
index 261a0ad3f8a1bf0ae4af6e76c9a2a246115589b4..cffebcd8b0fc60a646101d02553bc87a269a6272 100644 (file)
@@ -841,6 +841,7 @@ int lttng_abi_open_metadata_stream(struct file *channel_file)
        metadata_stream->priv = buf;
        stream_priv = metadata_stream;
        metadata_stream->transport = channel->transport;
+       mutex_init(&metadata_stream->lock);
 
        /*
         * Since life-time of metadata cache differs from that of
@@ -1555,7 +1556,8 @@ error:
        return ret;
 }
 
-void __exit lttng_abi_exit(void)
+/* No __exit annotation because used by init error path too. */
+void lttng_abi_exit(void)
 {
        if (lttng_proc_dentry)
                remove_proc_entry("lttng", NULL);
This page took 0.023231 seconds and 4 git commands to generate.