Fix: Add missing cmm_smp_mb() in deprecated urcu-signal
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 21 Aug 2023 15:20:37 +0000 (11:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 21 Aug 2023 15:23:07 +0000 (11:23 -0400)
commit 97d13221f8a1 ("Phase 1 of deprecating liburcu-signal") miss a
cmm_smp_mb() at the beginning of the read-side critical sections, which
causes spurious failures in the CI tests.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Id8d5822142bef5f418e2c4653369d93968dca637

include/urcu/static/urcu-signal.h

index 0f78ac0d1e1378d8a2898ce27ae424212747d9ce..07768b340a768a30584bdf643ff14c61097a8203 100644 (file)
@@ -59,7 +59,7 @@ static inline void _urcu_signal_read_lock_update(unsigned long tmp)
 {
        if (caa_likely(!(tmp & URCU_GP_CTR_NEST_MASK))) {
                _CMM_STORE_SHARED(URCU_TLS(urcu_signal_reader).ctr, _CMM_LOAD_SHARED(urcu_signal_gp.ctr));
 {
        if (caa_likely(!(tmp & URCU_GP_CTR_NEST_MASK))) {
                _CMM_STORE_SHARED(URCU_TLS(urcu_signal_reader).ctr, _CMM_LOAD_SHARED(urcu_signal_gp.ctr));
-               cmm_barrier();
+               cmm_smp_mb();
        } else
                _CMM_STORE_SHARED(URCU_TLS(urcu_signal_reader).ctr, tmp + URCU_GP_COUNT);
 }
        } else
                _CMM_STORE_SHARED(URCU_TLS(urcu_signal_reader).ctr, tmp + URCU_GP_COUNT);
 }
This page took 0.038863 seconds and 4 git commands to generate.