[lxc-devel] [PATCH 1/1] api locking: take process lock around open/close

Serge Hallyn serge.hallyn at ubuntu.com
Thu May 30 20:43:05 UTC 2013


Quoting Dwight Engen (dwight.engen at oracle.com):
> On Wed, 29 May 2013 22:21:22 -0500
> Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> 
> > And update the comment explaining the locking.
> > 
> > Also take memlock in want_daemonize.
> 
> Hi Serge, could you explain a bit what the locking is protecting about
> open/close? It looks like you are locking around just the open or

Ok, I was under the impression that some libcs still had open/close
not threadsafe.  Apparently I'm wrong about that.  So I think the
majority of this patch can be dropped.  The locking comment updates
should still go in, as should the remaining reference to c->privlock
which was converted here.

I'll also switch process_lock users to assuming it can't fail, and
make it die harder if the mutex actually fails.

Will post new patches.  Thanks!

> just the close, and not the whole open to close region so I'm a bit
> confused on what scenario the locks are protecting against.

-serge




More information about the lxc-devel mailing list