[Asterisk-code-review] chan sip.c: Fix mwi resub deadlock potential. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Mar 15 14:58:33 CDT 2016


Richard Mudgett has uploaded a new patch set (#2).

Change subject: chan_sip.c: Fix mwi resub deadlock potential.
......................................................................

chan_sip.c: Fix mwi resub 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.

ASTERISK-25023 #close

Change-Id: I96d429c57a48861fd8bde63dd93db4e92dc3adb6
---
M channels/chan_sip.c
1 file changed, 92 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/01/2401/2
-- 
To view, visit https://gerrit.asterisk.org/2401
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I96d429c57a48861fd8bde63dd93db4e92dc3adb6
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019



More information about the asterisk-code-review mailing list