Ludwig,

In the future, can you make all comments of fix reviews in the trac ticket? We actually never discuss reviews on mailing lists - only in the trac tickets. Rich missed your comments about this bug.

Thanks,
Mark

On 12/10/2012 10:57 AM, Ludwig Krispenz wrote:
And I think be_addsuffix is not safe.

If two threads try to add a suffix, both can get the same current count, the both set the new suffix
be->be_suffix[count]= slapi_sdn_dup(suffix);

and then both increment count. the increment is atomic, but the assignment could be done to the wrong index.

Ludwig

On 12/10/2012 04:49 PM, Ludwig Krispenz wrote:
Hi Mark,

in the locked version the list of suffixes cannot be changed while you loop over them. In your version you get the suffix count and the do a for loop i=0..count on it. Although suffixes don't get deleted from the array there couls be cases where one is added from the time you get the count to whwn you execute the loop. Could this be a problem ?

Ludwig


On 12/10/2012 04:29 PM, Mark Reynolds wrote:
Here is the lock-free version....
https://fedorahosted.org/389/ticket/509

https://fedorahosted.org/389/attachment/ticket/509/0001-Ticket-509-lock-free-access-to-be-be_suffixlock.patch



--
389-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/389-devel

--
389-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/389-devel

--
Mark Reynolds
Red Hat, Inc
[email protected]

--
389-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/389-devel

Reply via email to