diff options
author | Mark Michelson <mmichelson@digium.com> | 2015-09-17 17:28:30 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-10-22 16:16:29 -0500 |
commit | 067f40876001255aed9bf8b65567d1c25961aebd (patch) | |
tree | 887ed7b533a5e746eeaf2622bb2d07d83462fb1b /build_tools | |
parent | 1bcc5927655c71f2ea0db31c0cd0a3bf0095714d (diff) |
res_pjsip_pubsub: Remove serializer when sending final NOTIFY.
There have been crashes seen where a taskprocessor's listener is NULL
unexpectedly.
Looking at backtraces, the problem was specifically seen in PJSIP
serializers.
Subscriptions make the mistake of removing a serializer from a dialog
during subscription tree destruction. Since subscription trees are
reference-counted, guaranteeing the circumstances behind the destruction
are not possible. This makes it so that the dialog serializer can be
removed while not holding the dialog lock. This makes it possible for
the distributor to get a pointer to the dialog serializer and have that
serializer get freed out from under it.
The fix for this is to remove the serializer from a subscription dialog
when sending the final NOTIFY. This guarantees that the serializer is
removed with the dialog lock held. By doing this, we guarantee that if
the distributor gains access to the dialog's serializer, it will not be
possible for the serializer to get freed by another thread.
Change-Id: I21f5dac33529f65cec45679bdace60670800ff66
Diffstat (limited to 'build_tools')
0 files changed, 0 insertions, 0 deletions