Fix: incorrect structure layout with mixed LGPL/non-LGPL objects
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 25 May 2016 21:17:41 +0000 (17:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 May 2016 02:03:53 +0000 (22:03 -0400)
Linking both _LGPL_SOURCE and non-_LGPL_SOURCE objects into the same
module may result in corruption. If the tracepoint_dlopen object used is
the one declared by a LGPL compile unit, a non-LGPL compile unit may try
to initialize fields beyond the end of the structure.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h

index 0bb5d6135b84700f33dcff02def3874e7c807a12..17cbd41f93b1d11d972b867e7924eda2cca72c87 100644 (file)
@@ -218,11 +218,9 @@ struct lttng_ust_tracepoint_dlopen {
        int (*tracepoint_register_lib)(struct lttng_ust_tracepoint * const *tracepoints_start,
                int tracepoints_count);
        int (*tracepoint_unregister_lib)(struct lttng_ust_tracepoint * const *tracepoints_start);
-#ifndef _LGPL_SOURCE
        void (*rcu_read_lock_sym_bp)(void);
        void (*rcu_read_unlock_sym_bp)(void);
        void *(*rcu_dereference_sym_bp)(void *p);
-#endif
 };
 
 extern struct lttng_ust_tracepoint_dlopen tracepoint_dlopen;
This page took 0.025126 seconds and 4 git commands to generate.