Commit b9d0883d authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

dump: Anonymous shared mappings should have MAP_ANONYMOUS flag

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 20c3bf10
...@@ -367,6 +367,7 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files) ...@@ -367,6 +367,7 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
if (MAJOR(st_buf.st_dev) == 0) { if (MAJOR(st_buf.st_dev) == 0) {
if (!(vma_area->vma.flags & MAP_SHARED)) if (!(vma_area->vma.flags & MAP_SHARED))
goto err_bogus_mapping; goto err_bogus_mapping;
vma_area->vma.flags |= MAP_ANONYMOUS;
vma_area->vma.status |= VMA_ANON_SHARED; vma_area->vma.status |= VMA_ANON_SHARED;
vma_area->shmid = st_buf.st_ino; vma_area->shmid = st_buf.st_ino;
} else { } else {
......
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