[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#4917) at_insert() moves sat_ad_mutex
h.b.furuseth@usit.uio.no wrote:
> Full_Name: Hallvard B Furuseth
> Version: HEAD
> OS:
> URL:
> Submission from: (NULL) (129.240.202.105)
> Submitted by: hallvard
>
>
> slapd/at.c:at_insert() swaps the contents of the initialized
> mutexes 'old_sat->sat_ad_mutex' and 'sat->sat_ad_mutex' in the
> /* replacing a deleted definition? */ code.
>
> I hope they are at least unlocked at the time...
> Does ldap_pvt_thread_pool_pause() in config_back_add() & co block
> the other threads?
Yes of course, otherwise none of the config activities would be safe.
> If so, the simplest clean fix may be to destroy and reinitialize
> the mutexes (instead of swapping them back), I think strictly
> speaking behaviour is undefined if one copies mutexes around at
> all. Or since one will immediately be destroyed, maybe they should
> be destroyed when SLAP_AT_DELETED is set, if it is not needed then.
Destroying immediately is not feasible since the attribute may still be
in use. Show me the POSIX spec that indicates this behavior is undefined.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/