Commit c8384940 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mem: stop searching a parent vma if we found one

A parent vma can be only one.

Fixes: 57d25e7c ("mm: fix expression to determine which vma-s can be shared")
Reported-by: 's avatarFilipe Brandenburger <filbranden@google.com>
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b57497ad
...@@ -261,6 +261,8 @@ static int map_private_vma(pid_t pid, struct vma_area *vma, void **tgt_addr, ...@@ -261,6 +261,8 @@ static int map_private_vma(pid_t pid, struct vma_area *vma, void **tgt_addr,
pr_info("COW 0x%016"PRIx64"-0x%016"PRIx64" 0x%016"PRIx64" vma\n", pr_info("COW 0x%016"PRIx64"-0x%016"PRIx64" 0x%016"PRIx64" vma\n",
vma->e->start, vma->e->end, vma->e->pgoff); vma->e->start, vma->e->end, vma->e->pgoff);
paddr = decode_pointer(p->premmaped_addr); paddr = decode_pointer(p->premmaped_addr);
break;
} }
*pvma = p; *pvma = p;
......
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