Commit 23e092f7 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

ghosts: Add comment about shared path allocation

Ghost remaps allocate path with shmalloc. Add comment
why this is such.

✓ travis-ci: success for Sanitize initialization bits
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 2356e5ff
...@@ -259,6 +259,13 @@ static int collect_remap_ghost(struct reg_file_info *rfi, ...@@ -259,6 +259,13 @@ static int collect_remap_ghost(struct reg_file_info *rfi,
if (!gf) if (!gf)
return -1; return -1;
/*
* The rpath is shmalloc-ed because we create the ghost
* file in root task context and generate its path there.
* However the path should be visible by the criu task
* in order to remove the ghost files from root FS (see
* try_clean_remaps()).
*/
gf->remap.rpath = shmalloc(PATH_MAX); gf->remap.rpath = shmalloc(PATH_MAX);
if (!gf->remap.rpath) if (!gf->remap.rpath)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment