[CRIU] Re: [PATCH] reg-files: Serialize linking of ghost files

Cyrill Gorcunov gorcunov at openvz.org
Mon Sep 17 06:31:18 EDT 2012


On Mon, Sep 17, 2012 at 02:26:47PM +0400, Pavel Emelyanov wrote:
> On 09/17/2012 12:50 PM, Cyrill Gorcunov wrote:
> > In case if there at least two tasks with same ghost
> > file we've a race in open_path -- both task may enter
> > the open_path at same time and try to link ghost file
> > to same name leading to
> > 
> >  | 26445: Error (files-reg.c:363): Can't link
> >  | /home/crtools/test/zdtm/live/static/write_read10.test (deleted).cr.1.ghost ->
> >  | /home/crtools/test/zdtm/live/static/write_read10.test (deleted)
> > 
> > The both tasks have ghost files as
> > 
> >  | id:  0x3 flags: 0x8002 pos: 0000000000000000 ... name: "/home/crtools/test/zdtm/live/static/write_read10.test (deleted)"
> > 
> > and
> > 
> >  | id: 0x10 flags: 0x8002 pos: 0000000000000000 ... name: "/home/crtools/test/zdtm/live/static/write_read10.test (deleted)"
> > 
> > Thus, to serialize link/unlink procedure we use per-ghost-file mutex.
> 
> In that case users can be just unsigned int

Yes, but I didn't want to squash everything in one patch. I'll do that on top.


More information about the CRIU mailing list