mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
restore: check that a restorer vma doesn't intersect with target vma-s
[ xemul: The fix effectively is -- stop scanning the 2nd vma list once we see, that the hint's end hits the next vma ] Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
7d3a89970e
commit
fa11d76cab
@@ -881,6 +881,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;
|
||||
|
Reference in New Issue
Block a user