Files
falco/userspace
irozzo-1A 8989870d26 fix(userspace/falco): fix watchdog race condition on timeout exchange
The watchdog thread and stop() consume the timeout pointer with
m_timeout.exchange(nullptr, ...). That exchange was using
memory_order_release. The load part of the RMW needs acquire
semantics so it synchronizes-with the release store in
set_timeout()/cancel_timeout(); otherwise the consumer can see
the pointer value without seeing the writes that initialized
the timeout_data and payload (data race).
Use memory_order_acq_rel on the consumer exchanges so the load
synchronizes-with the producer and the pointed-to memory is
visible before use.

Signed-off-by: irozzo-1A <iacopo@sysdig.com>
2026-03-12 13:21:07 +01:00
..