]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: Fix t38id deadlock potential. 99/2399/3
authorRichard Mudgett <rmudgett@digium.com>
Thu, 10 Mar 2016 18:17:09 +0000 (12:17 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 16 Mar 2016 19:53:00 +0000 (14:53 -0500)
commit32bd7a64f98d5e9cf176cba1c701145201b1f987
treebd2cfeb7ee1546a36d7e11626af3fe756d5b3798
parent43556b800b7838fc989f243a2974d33a8f8a12ce
chan_sip.c: Fix t38id 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

Change-Id: If595e4456cd059d7171880c7f354e844c21b5f5f
channels/chan_sip.c