Skip to content

Commit

Permalink
proc_parse: Don't bail out on is_memfd() VMAs
Browse files Browse the repository at this point in the history
Co-authored-by: Ivanq <[email protected]>
Signed-off-by: Younes Manton <[email protected]>
  • Loading branch information
ymanton and purplesyringa committed Dec 12, 2022
1 parent 7ec3028 commit 8e4550c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions criu/proc_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,24 +313,6 @@ static int vma_get_mapfile_user(const char *fname, struct vma_area *vma, struct

vfi_dev = makedev(vfi->dev_maj, vfi->dev_min);

if (is_memfd(vfi_dev)) {
char tmp[PATH_MAX];
strlcpy(tmp, fname, PATH_MAX);
strip_deleted(tmp, strlen(tmp));

/*
* The error EPERM will be shown in the following pr_perror().
* It comes from the previous open() call.
*/
pr_perror("Can't open mapped [%s]", tmp);

/*
* TODO Perhaps we could do better than failing and dump the
* memory like what is being done in shmem.c
*/
return -1;
}

if (is_hugetlb_dev(vfi_dev, &hugetlb_flag) || is_anon_shmem_map(vfi_dev)) {
vma->e->status |= VMA_AREA_REGULAR;
if (!(vma->e->flags & MAP_SHARED))
Expand Down

0 comments on commit 8e4550c

Please sign in to comment.