[Asterisk-code-review] thirdparty/pjproject: fix dealdock in response retransmissions (asterisk[13])

Torrey Searle asteriskteam at digium.com
Tue Jul 17 07:15:47 CDT 2018


Torrey Searle has uploaded this change for review. ( https://gerrit.asterisk.org/9477


Change subject: thirdparty/pjproject: fix dealdock in response retransmissions
......................................................................

thirdparty/pjproject: fix dealdock in response retransmissions

The tdata containging response can be shared by both the dialog
object and the tsx object.  Before removing headers from the tdata
it's therefore necessary to lock both the dialog and the tsx object
to avoid race conditions.

Change-Id: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e
---
A third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch
1 file changed, 15 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/9477/1

diff --git a/third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch b/third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch
new file mode 100644
index 0000000..83d0ab7
--- /dev/null
+++ b/third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch
@@ -0,0 +1,15 @@
+--- a/pjsip/src/pjsip-ua/sip_inv.c
++++ b/pjsip/src/pjsip-ua/sip_inv.c
+@@ -2400,7 +2400,12 @@ PJ_DEF(pj_status_t) pjsip_inv_answer(	pj
+ 
+     /* Modify last response. */
+     last_res = inv->last_answer;
++    /* Lock the transaction as it also has a reference to the last response and timers
++       may access it */
++    pj_grp_lock_acquire(inv->invite_tsx->grp_lock);
+     status = pjsip_dlg_modify_response(inv->dlg, last_res, st_code, st_text);
++    pj_grp_lock_release(inv->invite_tsx->grp_lock);
++
+     if (status != PJ_SUCCESS)
+ 	goto on_return;
+ 

-- 
To view, visit https://gerrit.asterisk.org/9477
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e
Gerrit-Change-Number: 9477
Gerrit-PatchSet: 1
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180717/adfa00ee/attachment-0001.html>


More information about the asterisk-code-review mailing list