[Asterisk-code-review] res/res pjsip: Fix crash due to misuse of session->media bet... (asterisk[13])

Joshua Colp asteriskteam at digium.com
Mon Nov 12 05:52:31 CST 2018


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/10601 )

Change subject: res/res_pjsip: Fix crash due to misuse of session->media between threads.
......................................................................


Patch Set 1: Code-Review-1

Instead of having this leak out to res_pjsip_session for the purpose of keeping the pointer present - why doesn't res_pjsip_t38 just not use session->media in that scenario at all?

It currently maintains a datastore on the channel to store data, this could also store a pointer (with reference) to the T.38 UDPTL session_media that is guaranteed to be valid - and would result in no looking up in session->media or needing to drop the channel lock or messing with its reference. This would be done when the session_media is allocated in this same module. Usage would require getting the datastore, which would have the session_media on it. When the datastore is destroyed it can then unreference the session_media and it will be destroyed as normal.


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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia92e2389b8d804bf205473e92ec06217e87ce237
Gerrit-Change-Number: 10601
Gerrit-PatchSet: 1
Gerrit-Owner: Paulo Vicentini <paulo.vicentini at gmail.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Comment-Date: Mon, 12 Nov 2018 11:52:31 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181112/7343af03/attachment.html>


More information about the asterisk-code-review mailing list