Fix a potential deadlock in chan_sip during transfers.
authorMark Michelson <mmichelson@digium.com>
Wed, 12 Dec 2012 00:02:31 +0000 (00:02 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 12 Dec 2012 00:02:31 +0000 (00:02 +0000)
commit607a5d898cc52b3f1b4d45e1e95ed07fe1f7dc32
tree8535a06b4e03f114101c475688f1abdbd425034c
parent9c74a60ba5731ebe65f76b9accbab0a688463ebe
Fix a potential deadlock in chan_sip during transfers.

The issue comes from the fact that transfers may perform
a redirecting update on a channel. The issue is that lock
inversion between the channel and its tech_pvt occurs since
the channel lock is released during the transfer process.

The fix is to move when the redirecting update occurs to a
place where neither the tech_pvt or the channel is locked so
that the two can be locked in the proper order.

(closes issue ASTERISK-20708)
reported by Mark Michelson
patches:
ASTERISK-20708-3.patch uploaded by Mark Michelson (License #5049)

Tested by:
Tim Ringenbach at Asteria Solutions Group
........

Merged revisions 377910 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c