[systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

Djalal Harouni tixxdz at opendz.org
Sat Mar 22 11:56:31 PDT 2014


On Sat, Mar 22, 2014 at 07:37:38PM +0100, Kay Sievers wrote:
> On Sat, Mar 22, 2014 at 3:43 PM, Daniel Mack <daniel at zonque.org> wrote:
> >> Also it seems that now there is only support for one level of nested
> >> domains? will this be increased?
> >
> > I don't think so. What's your use case here?
> 
> We never tried, but the code was supposed to allow stacking of them.
> I'll fix it.
Yes I was thinking of applications that create domains, they wont work
if they are inside a container domain!


> >> 2) What about creating custom endpoints on the bus that was already
> >> unrefed ? IMHO this is the same scenario!
> >
> > That shouldn't happen of course. We've been dealing with locking in that
> > area quite a bit, but we might have overlooked something. Please send a
> > patch if you see such an unsafe locking scenario.
> >
> >> Hmm perhaps this can be improved by taking a ref ASAP and revalidate
> >> objects by checking the "*->disconnected" ?
> >
> > ->disconnected isn't so much of an issue, and we do check for it where
> > necessary. Apart from that, users that store a pointer to any object
> > should take a reference, so it can't disappear underneath them. But
> > again, if you think we've overlooked anything, let us know. Reviewing
> > all these details is certainly much appreciated.
> 
> I'll add a few more "disconnected checks" before we link into the
> parent objects.
Yes, I've located some sites, and I'm trying to do more tests...

I'll get back to you, Thanks Daniel, Kay!

> Kay

-- 
Djalal Harouni
http://opendz.org


More information about the systemd-devel mailing list