[Asterisk-code-review] pbx: Deadlock between contexts container and context merge l... (asterisk[11])

Joshua Colp asteriskteam at digium.com
Sun Jan 10 08:46:55 CST 2016


Joshua Colp has posted comments on this change.

Change subject: pbx: Deadlock between contexts container and context_merge locks
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/1960/1/main/pbx.c
File main/pbx.c:

Line 6044: 	payload->device_state = ast_extension_state2(ne, NULL);
         : 
         : 	presence_state = extension_presence_state_helper(
         : 		ne, &payload->presence_subtype, &payload->presence_message);
         : 
         : 	payload->presence_state = presence_state > 0 ? presence_state : AST_PRESENCE_INVALID;
You can't determine the device and presence state in here, it has to be done when the message is handled otherwise you have a potential race condition where the device and presence is updated by a message in front of you, only to have it then changed back to an earlier value by this. It's a slim window but still there.


-- 
To view, visit https://gerrit.asterisk.org/1960
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If2210ea241afd1585dc2594c16faff84579bf302
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list