]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] re_cache: stop timer during async operations to prevent re-entry
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 29 Jan 2026 16:49:20 +0000 (16:49 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 29 Jan 2026 16:49:20 +0000 (16:49 +0000)
commitd051d75b382c87db059583a029313ddeac97c27a
treec47d21734e70429594a8cad0cf3acee849184117
parent23e711c55e28d93e1ce3e1d58a3da574ea070cd8
[Fix] re_cache: stop timer during async operations to prevent re-entry

Stop the timer before calling exists_async and save_async to prevent
the timer from firing multiple times while an async callback is pending.
Without this, the repeating timer (0.1s interval) could fire again before
the async operation completes, causing multiple concurrent async calls
for the same re_class. This led to race conditions and use-after-free
crashes when callbacks completed out of order.
src/libserver/re_cache.c