]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: Fix autokillid deadlock potential. 94/2394/3
authorRichard Mudgett <rmudgett@digium.com>
Mon, 7 Mar 2016 19:21:44 +0000 (13:21 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 16 Mar 2016 19:53:00 +0000 (14:53 -0500)
commit9cb8f73226126db70bac54fd7af8093ab05ffd6f
treef186d6b5b3d8e29b94e420e72fa90c75e0fa655e
parentc5c7f48a15a17fcc29ff022223df5229ef9a003f
chan_sip.c: Fix autokillid 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 clearing autokillid in __sip_autodestruct() even though we could
reschedule.

ASTERISK-25023

Change-Id: I450580dbf26e2e3952ee6628c735b001565c368f
channels/chan_sip.c
channels/sip/include/dialog.h