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.2.0-rc1~76 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1b436e01d6efb820d7a5b2f96c7148c1f36c6fac;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; \