[OpenSIPS-Devel] [OpenSIPS/opensips] 91f411: presence: Fix subtle race condition in update_db_s...
Liviu Chircu
noreply at github.com
Mon Jul 22 15:55:00 UTC 2024
Branch: refs/heads/3.5
Home: https://github.com/OpenSIPS/opensips
Commit: 91f41107b763d527e3416660f484468bc5450faf
https://github.com/OpenSIPS/opensips/commit/91f41107b763d527e3416660f484468bc5450faf
Author: Liviu Chircu <liviu at opensips.org>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M modules/presence/subscribe.c
Log Message:
-----------
presence: Fix subtle race condition in update_db_subs()
While walking the list and collecting expired subscriptions, it is
incorrect to temporarily release, then re-acquire the lock and still
make use of the @s or @prev_s pointers afterwards, as the list may have
changed in the meantime!
The fix is to detach and collect any expired subs, then walk & handle
them in a separate iteration.
(cherry picked from commit b8e0250bc957bb408f23317012716524129f1fa9)
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list