[Asterisk-code-review] res pjsip distributor: Get a reference to dialog serializer. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Sat Sep 19 08:30:15 CDT 2015
Joshua Colp has posted comments on this change.
Change subject: res_pjsip_distributor: Get a reference to dialog serializer.
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
I agree with Richard though. If it really is possible to remove the reference to the serializer without holding a dialog lock then there is still a window between the other thread unreffing and us reffing. You really shouldn't manipulate it without having the dialog lock held. I also think we need to better understand the problem - more specifically what is dropping that ref and when.
https://gerrit.asterisk.org/#/c/1284/1/res/res_pjsip/pjsip_distributor.c
File res/res_pjsip/pjsip_distributor.c:
Line 257: dist = pjsip_dlg_get_mod_data(dlg, distributor_mod.id);
: if (dist) {
: serializer = ao2_bump(dist->serializer);
: }
> I think for safety we really need to lock the dialog to get the serializer
The dialog is already locked here. The find_dialog function returns it locked.
--
To view, visit https://gerrit.asterisk.org/1284
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I14563093f8320f79063b65792461f18f06c07a77
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list