[CRIU] [PATCH cr 1/3] restore: check that a restorer vma doesn't
intersect with target vma-s
Andrey Vagin
avagin at openvz.org
Fri Apr 6 16:22:18 EDT 2012
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-restore.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/cr-restore.c b/cr-restore.c
index 3019c81..2162fc1 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -892,6 +892,8 @@ static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list,
unsigned long prev_vma_end2 = 0;
list_for_each_entry(s_vma, self_vma_list, list) {
+ if (prev_vma_end2 + vma_len > t_vma->vma.start)
+ break;
if (prev_vma_end2 && (prev_vma_end2 >= prev_vma_end) &&
((s_vma->vma.start - prev_vma_end2) > vma_len))
return prev_vma_end2;
--
1.7.1
More information about the CRIU
mailing list