[CRIU] [PATCH 3/7] files-reg: Allocate the complete ghost file structure in shared memory

Cyrill Gorcunov gorcunov at openvz.org
Wed Dec 5 15:03:52 EST 2012


On Wed, Dec 05, 2012 at 11:59:09PM +0400, Pavel Emelyanov wrote:
> >> Why do we need the path string in shared memory?
> > 
> > Because we might need access the path from another process.
> > Say task 1 opens file, then forks then task 2 hooks a watch
> > on it and then task 1 deletes it.
> 
> This is how it currently works -- tasks open ghosts in _their_
> context, while they were created by crtools master process. The
> shmalloc is only required when you want to _modify_ memory from
> sub-tasks. Reading will work even on regular malloc.

Yup, it seems i misinterpreted the error I've got earlier on
path dereference. I've changed it back to regular malloc now.
I suppose I better send out complete new series, right?


More information about the CRIU mailing list