]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_t38.c: Fix deadlock in T.38 framehook.
authorRichard Mudgett <rmudgett@digium.com>
Sat, 29 Apr 2017 21:11:21 +0000 (16:11 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Sat, 29 Apr 2017 23:12:33 +0000 (18:12 -0500)
commit9d5df489681009cfc38ab626cf6c9022ff7197aa
tree0456ead07be8b402f6557e5675240ba7b64e5e65
parentbf7cf10d1522092bc099a1f9a2e28ba23685e8f6
res_pjsip_t38.c: Fix deadlock in T.38 framehook.

A deadlock can happen between a channel lock and a pjsip session media
container lock.  One thread is processing a reINVITE's SDP and walking
through the session's media container when it waits for the channel lock
to put the determined format capabilities onto the channel.  The other
thread is writing a frame to the channel and processing the T.38 frame
hook.  The T.38 frame hook then waits for the pjsip session's media
container lock.  The two threads are now deadlocked.

* Made the T.38 frame hook release the channel lock before searching the
session's media container.  This fix has been done to several other
frame hooks to fix deadlocks.

ASTERISK-26974 #close

Change-Id: Ie984a76ce00bef6ec9aa239010e51e8dd74c8186
res/res_pjsip_t38.c