[Asterisk-code-review] stasis/control: Fix possible deadlock with swap channel (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Fri Sep 1 15:08:16 CDT 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/6366 )
Change subject: stasis/control: Fix possible deadlock with swap channel
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/6366/1/res/stasis/control.c
File res/stasis/control.c:
https://gerrit.asterisk.org/#/c/6366/1/res/stasis/control.c@1062
PS1, Line 1062: control->bridge = bridge;
Setting the bridge here is bad when the control gets unlocked for the ast_bridge_impart(). If the callback happens, it "clears" the pointer and then we later set it here.
You may be able to get away with setting the control->bridge pointer before the impart and clear it like control->pbx if it fails.
I don't know the repercussions of setting the pointer early though. Some other thread may try to depart the channel from the bridge before it has actually gotten into the bridge.
--
To view, visit https://gerrit.asterisk.org/6366
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd239aa93955b3eb475521f61e284fcb0da2c3b3
Gerrit-Change-Number: 6366
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 01 Sep 2017 20:08:16 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170901/99f40a9d/attachment.html>
More information about the asterisk-code-review
mailing list