From: Mathieu Desnoyers Date: Tue, 26 Feb 2013 20:25:18 +0000 (-0500) Subject: Use tp rcu link test in provider X-Git-Tag: v2.1.2~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3ac4bd8ab309129f091ac180fb68e49cfc23dc8b;p=lttng-ust.git Use tp rcu link test in provider Ensure we never trigger a null pointer exception. Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index b3fb2d40..e46cc1a1 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -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; \