[Asterisk-code-review] rtp engine.c: Initial split of payload types into rx and tx ... (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Mon Aug 3 11:44:17 CDT 2015
Richard Mudgett has posted comments on this change.
Change subject: rtp_engine.c: Initial split of payload types into rx and tx mappings.
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/1018/1/main/rtp_engine.c
File main/rtp_engine.c:
Line 810: ast_rwlock_rdlock(&src->codecs_lock);
: ast_rwlock_wrlock(&dest->codecs_lock);
The same deadlock could theoretically happen here but in practice it is unlikely because of the src and dest structs used by the callers.
Line 826: if (src != dest) {
: ast_rwlock_rdlock(&src->codecs_lock);
: }
: ast_rwlock_wrlock(&dest->codecs_lock);
This is a potential deadlock for future code that will actually fix the dynamic payload type exchange ASTERISK-25166 is about. We are write locking one and read locking the other and there is no locking order for the same level locks.
--
To view, visit https://gerrit.asterisk.org/1018
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaf6c227bca68cb7c414cf2fd4108a8ac98bd45ac
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list