Use tp rcu link test in provider
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Feb 2013 20:25:18 +0000 (15:25 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Feb 2013 20:34:12 +0000 (15:34 -0500)
Ensure we never trigger a null pointer exception.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-tracepoint-event.h

index b3fb2d404e6f1785f3382bb5d3d48d462ee4c022..e46cc1a1a28cc4d9c440a3ccb816d79ef530e840 100644 (file)
@@ -502,6 +502,8 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))           \
                return;                                                       \
        if (caa_unlikely(!CMM_ACCESS_ONCE(__event->enabled)))                 \
                return;                                                       \
+       if (caa_unlikely(!TP_RCU_LINK_TEST()))                                \
+               return;                                                       \
        if (caa_unlikely(!cds_list_empty(&__event->bytecode_runtime_head))) { \
                struct lttng_bytecode_runtime *bc_runtime;                    \
                int __filter_record = __event->has_enablers_without_bytecode; \
This page took 0.025296 seconds and 4 git commands to generate.