Commit 7d091fe9 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

pagema-cache: Don't exceed task size on hight bound

If area is close to TASK_SIZE limit the high address
may exceed it returning error once we try to read
pagemap file. So limit the high address.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent db3371be
...@@ -66,6 +66,9 @@ static int pmc_fill_cache(pmc_t *pmc, struct vma_area *vma) ...@@ -66,6 +66,9 @@ static int pmc_fill_cache(pmc_t *pmc, struct vma_area *vma)
size_t len = vma_area_len(vma); size_t len = vma_area_len(vma);
size_t size_map; size_t size_map;
if (high > TASK_SIZE)
high = TASK_SIZE;
pmc->start = vma->e->start; pmc->start = vma->e->start;
pmc->end = vma->e->end; pmc->end = vma->e->end;
......
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