[Freeipa-devel] [PATCH 0078] Use automatic connection management in LDAP modification code to prevent potential deadlock

Petr Spacek pspacek at redhat.com
Mon Oct 15 11:10:26 UTC 2012


On 10/09/2012 03:49 PM, Petr Spacek wrote:
> On 10/09/2012 01:21 PM, Adam Tkac wrote:
>> On Mon, Oct 08, 2012 at 04:46:54PM +0200, Petr Spacek wrote:
>>> Hello,
>>>
>>>      Use automatic connection management in LDAP modification code to
>>>      prevent potential deadlock.
>>>
>>>      Without this patch the plugin will deadlock when modify_ldap_common()
>>>      is called with PTR synchronization enabled and only single
>>>      connection is available in the connection pool.
>>
>> Nack
>>
>> If I read the patch correctly, it leaves unused ldap_conn parameters in
>> ldap_modify_do() and modify_soa_record() functions.
>>
>> Those params are always NULL so they can be safely removed. Please also remove
>> the "autoconn" variable from ldap_modify_do()
>
> My intent was to keep the same connection management abilities as are in
> ldap_query(): You can avoid repetitive ldap_pool_get/putconnection() calls by
> passing connection via parameter.
>
> I can remove it if it isn't worth. (Actually *_modify_*() functions do not use
> this capability now.)

I forgot to send the patch after our discussion on IRC. Attached patch removes 
unused parameters.

> Petr^2 Spacek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-dyndb-ldap-pspacek-0078-2-Use-automatic-connection-management-in-LDAP-modifica.patch
Type: text/x-patch
Size: 5563 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20121015/0d16c180/attachment.bin>


More information about the Freeipa-devel mailing list