[Asterisk-code-review] stasis/control: Fix possible deadlock with swap channel (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Wed Sep 6 12:47:34 CDT 2017


Richard Mudgett has uploaded a new patch set (#4) to the change originally created by George Joseph. ( https://gerrit.asterisk.org/6367 )

Change subject: stasis/control:  Fix possible deadlock with swap channel
......................................................................

stasis/control:  Fix possible deadlock with swap channel

If an error occurs during a bridge impart it's possible that
the "bridge_after" callback might try to run before
control_swap_channel_in_bridge has been signalled to continue.
Since control_swap_channel_in_bridge is holding the control lock
and the callback needs it, a deadlock will occur.

* control_swap_channel_in_bridge now only holds the control
  lock while it's actually modifying the control structure and
  releases it while the bridge impart is running.
* bridge_after_cb is now tolerant of impart failures.

Change-Id: Ifd239aa93955b3eb475521f61e284fcb0da2c3b3
---
M include/asterisk/bridge_after.h
M main/bridge.c
M main/bridge_after.c
M res/stasis/control.c
4 files changed, 96 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/67/6367/4
-- 
To view, visit https://gerrit.asterisk.org/6367
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifd239aa93955b3eb475521f61e284fcb0da2c3b3
Gerrit-Change-Number: 6367
Gerrit-PatchSet: 4
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170906/ab6271c4/attachment.html>


More information about the asterisk-code-review mailing list