[Asterisk-code-review] astobj2: Fix inverted check ao2 container clone. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Oct 3 10:44:54 CDT 2018


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

Change subject: astobj2: Fix inverted check ao2_container_clone.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/10390/1/main/astobj2_container.c
File main/astobj2_container.c:

https://gerrit.asterisk.org/#/c/10390/1/main/astobj2_container.c@771
PS1, Line 771: 	if (!(flags & OBJ_NOLOCK)) {
> Actually now that I'm looking at this again why do we need to lock clone at all?  The only pointer t […]
You are going to run into issues with rwlocks if it is not locked.  __adjust_lock() has to assume that the lock is held for rwlocks to know how to adjust the lock.  You have stated that the lock is already held by external code when you pass OBJ_NOLOCK.

It is not like there will be any contention for the lock in order to lock it.



-- 
To view, visit https://gerrit.asterisk.org/10390
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: I9662b82eb39e7627a1f1944fd18f967a2b987344
Gerrit-Change-Number: 10390
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 03 Oct 2018 15:44:54 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181003/8a0287f2/attachment.html>


More information about the asterisk-code-review mailing list