apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: [Patch]: Add basic function to APR for LDAP rebind callback support.
Date Mon, 03 Dec 2007 23:26:38 GMT
Paul J. Reder wrote:

> Your changes look good to me (assuming the ldap struct does get passed 
> in to
> the cleanup). I made a few minor alterations to your patch and attached it
> here. I like the simplification of automatically registering the callback
> and better name space protection.
> 
> I'm a little concerned about the pool cleanup though. I'll probably still
> explicitly call the remove because I'm concerned that in a busy system 
> there
> could be a window where the ldap struct is freed and reused by another 
> request
> before the first request processing is completed and the cleanup is 
> paged in
> and run. In that case the old xref might be found (even though the new 
> one will
> likely have been added). Calling the remove explicitly allows the xref 
> to be
> removed as soon as the ldap struct is no longer required rather than 
> waiting
> for the rest of the HTTP processing to happen before the pool is cleaned 
> up.

I looked at this scenario while I was adding the cleanup, and managed to 
talk myself out of it being possible. Now you have talked me back into 
it again :)

Thinking about it again...

The line of thinking that I took, was to confirm whether it is 
reasonable for the LDAP structure to outlive the pool used when the 
thing was created, but then the LDAP structure didn't come from the 
pool, and we don't register a cleanup for that (as I recall), so to be 
consistent, we shouldn't make a cleanup at all. Will change it.

Regards,
Graham
--

Mime
View raw message