Fix: use after free in ring buffer clients
[lttng-modules.git] / lib / ringbuffer / backend_types.h
index 4578185c3c75d8a1fb307a5e78ddbb1567bbd878..1577c812bb93c1df71cb5f736d8c1de6c8a933f6 100644 (file)
@@ -1,14 +1,26 @@
-#ifndef _LINUX_RING_BUFFER_BACKEND_TYPES_H
-#define _LINUX_RING_BUFFER_BACKEND_TYPES_H
+#ifndef _LIB_RING_BUFFER_BACKEND_TYPES_H
+#define _LIB_RING_BUFFER_BACKEND_TYPES_H
 
 /*
- * linux/ringbuffer/backend_types.h
- *
- * Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * lib/ringbuffer/backend_types.h
  *
  * Ring buffer backend (types).
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2008-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <linux/cpumask.h>
@@ -71,6 +83,8 @@ struct channel_backend {
        unsigned long num_subbuf;       /* Number of sub-buffers for writer */
        u64 start_tsc;                  /* Channel creation TSC value */
        void *priv;                     /* Client-specific information */
+       void *priv_ops;                 /* Client-specific ops pointer */
+       void (*release_priv_ops)(void *priv_ops);
        struct notifier_block cpu_hp_notifier;   /* CPU hotplug notifier */
        /*
         * We need to copy config because the module containing the
@@ -82,4 +96,4 @@ struct channel_backend {
        char name[NAME_MAX];            /* Channel name */
 };
 
-#endif /* _LINUX_RING_BUFFER_BACKEND_TYPES_H */
+#endif /* _LIB_RING_BUFFER_BACKEND_TYPES_H */
This page took 0.023546 seconds and 4 git commands to generate.