]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: Fix mwi resub deadlock potential. 01/2401/3
authorRichard Mudgett <rmudgett@digium.com>
Fri, 11 Mar 2016 18:22:48 +0000 (12:22 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 16 Mar 2016 19:53:00 +0000 (14:53 -0500)
commitde04308ae434bf3910725dc7d2c5a66ecd12d963
tree5b9ec2c459519c35e7c4a8edc38a23f69585a98f
parent5f6627a8a4f2ef68759cea0c27e7aaec25ac031c
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
channels/chan_sip.c