diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-18 18:33:17 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-18 18:33:17 +0000 |
commit | 4b2a73468293727319f34ea606a4a2b3d759e0f8 (patch) | |
tree | 1541736fe3b168980c5a84025f7b1c1c5bd83c48 /channels | |
parent | acbda8c5b8550f5dd2eec7fd12b35426c4671a61 (diff) |
Eliminate deadlock potential in dahdi_fixup().
(This is a backport of 269307, committed to trunk by rmudgett.)
Calling dahdi_indicate() when the channel private lock is already
held can cause a deadlock if the PRI lock is needed because
dahdi_indicate() will also get the channel private lock. The pri_grab()
function assumes that the channel private lock is held once to avoid
deadlock.
(closes issue #17261)
Reported by: aragon
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@271335 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_dahdi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index d54c951df..9cd089a93 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3938,10 +3938,10 @@ static int dahdi_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) dahdi_unlink(NULL, p, 0); p->subs[x].owner = newchan; } - if (newchan->_state == AST_STATE_RINGING) - dahdi_indicate(newchan, AST_CONTROL_RINGING, NULL, 0); update_conf(p); ast_mutex_unlock(&p->lock); + if (newchan->_state == AST_STATE_RINGING) + dahdi_indicate(newchan, AST_CONTROL_RINGING, NULL, 0); return 0; } |