[Asterisk-code-review] chan sip.c: Fix packet retransid deadlock potential. (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Wed Mar 16 14:55:13 CDT 2016
Hello Anonymous Coward #1000019, Joshua Colp,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/2412
to look at the new patch set (#2).
Change subject: chan_sip.c: Fix packet retransid deadlock potential.
......................................................................
chan_sip.c: Fix packet retransid deadlock potential.
This patch is part of a series to resolve deadlocks in chan_sip.c.
Stopping a scheduled event can result in a deadlock if the scheduled event
is running when you try to stop the event. If you hold a lock needed by
the scheduled event while trying to stop the scheduled event then a
deadlock can happen. The general strategy for resolving the deadlock
potential is to push the actual starting and stopping of the scheduled
events off onto the scheduler/do_monitor() thread by scheduling an
immediate one shot scheduled event. Some restructuring may be needed
because the code may assume that the start/stop of the scheduled events is
immediate.
* Fix retrans_pkt() to call check_pendings() with both the owner channel
and the private objects locked as required.
* Refactor dialog retransmission packet list to safely remove packet
nodes. The list nodes are now ao2 objects. The list has a ref and the
scheduled entry has a ref.
ASTERISK-25023
Change-Id: I50926d81be53f4cd3d572a3292cd25f563f59641
---
M channels/chan_sip.c
1 file changed, 96 insertions(+), 79 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/12/2412/2
--
To view, visit https://gerrit.asterisk.org/2412
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I50926d81be53f4cd3d572a3292cd25f563f59641
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list