[lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

Serge Hallyn serge.hallyn at ubuntu.com
Tue Nov 12 21:43:21 UTC 2013


Quoting Dwight Engen (dwight.engen at oracle.com):
> On Tue, 12 Nov 2013 14:42:54 -0600
> Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> 
> > Quoting Dwight Engen (dwight.engen at oracle.com):
> > > This is likely unnecessary, but is consistent with other uses of
> > > fopen()/fclose() in lxc.
> > > 
> > > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> > 
> > Do you think, regardless of your other fix, that it would still be
> > worth adding an fsync?
> 
> Hmm, good question. I guess its possible lxcapi_save_config() could be
> called by two different user processes for the same container and we'd
> wind up with a similar situation. Seems like we're trying to use the
> disk lock to protect against that,

Heh, yeah, that too.  Even worse.

>...but it wasn't enough so maybe we do




More information about the lxc-devel mailing list