X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Flttng-abi.c;h=7096daf7a544358202e14f49ae210d13397c48b2;hb=4a7d870a981874db47b3c3b94f913fdd57bf19d6;hp=a9beda756d7bbee4b9127eaec6c9ebb65353045f;hpb=99f52fcce5865809584c1e022bca1409702ea292;p=lttng-modules.git diff --git a/src/lttng-abi.c b/src/lttng-abi.c index a9beda75..7096daf7 100644 --- a/src/lttng-abi.c +++ b/src/lttng-abi.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -2144,8 +2145,13 @@ long lttng_abi_event_notifier_group_create_error_counter( goto counter_error; } - event_notifier_group->error_counter = counter; event_notifier_group->error_counter_len = counter_len; + /* + * store-release to publish error counter matches load-acquire + * in record_error. Ensures the counter is created and the + * error_counter_len is set before they are used. + */ + lttng_smp_store_release(&event_notifier_group->error_counter, counter); counter->file = counter_file; counter->owner = event_notifier_group->file;