[Asterisk-code-review] taskprocessor: Prevent race creating new taskprocessor. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Fri Nov 16 07:45:00 CST 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/10630 )

Change subject: taskprocessor: Prevent race creating new taskprocessor.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/10630/1/main/taskprocessor.c
File main/taskprocessor.c:

https://gerrit.asterisk.org/#/c/10630/1/main/taskprocessor.c@745
PS1, Line 745: static struct ast_taskprocessor *__allocate_taskprocessor(const char *name, struct ast_taskprocessor_listener *listener)
Add doxygen note that it is assumed the tps_singletons lock is already held since you are using the OBJ_NOLOCK flag in the function.


https://gerrit.asterisk.org/#/c/10630/1/main/taskprocessor.c@844
PS1, Line 844: 	p = ao2_find(tps_singletons, name, OBJ_KEY);
Since you were keeping track of the container lock to use the OBJ_NOLOCK flag, it should be added here too.



-- 
To view, visit https://gerrit.asterisk.org/10630
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: Id64fae94a6a1e940ddf38fde622dcd4391635382
Gerrit-Change-Number: 10630
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 16 Nov 2018 13:45:00 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181116/339e729b/attachment-0001.html>


More information about the asterisk-code-review mailing list