[CRIU] [PATCH] pagema-cache: Don't exceed task size on hight bound
Cyrill Gorcunov
gorcunov at openvz.org
Tue Feb 18 05:29:25 PST 2014
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: Cyrill Gorcunov <gorcunov at openvz.org>
---
pagemap-cache.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pagemap-cache.c b/pagemap-cache.c
index 904347fc9ded..b102345cae6e 100644
--- a/pagemap-cache.c
+++ b/pagemap-cache.c
@@ -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 size_map;
+ if (high > TASK_SIZE)
+ high = TASK_SIZE;
+
pmc->start = vma->e->start;
pmc->end = vma->e->end;
--
1.8.3.1
More information about the CRIU
mailing list