mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
vdso: Defer handling untill all zones are restored
In worst case we might be tryin to proxify vdso zone when vvar only is remmaped but vdso itself is not yet (left and right zones shifting). Thus vdso_proxify will complain that vdso is not yet mapped refusing to restore. Thus wait until everything is re-mapped then call for proxification helper. Reported: Mr. Jenkins Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
18fe357563
commit
5cb0c0d233
@@ -728,15 +728,6 @@ long __export_restore_task(struct task_restore_args *args)
|
||||
if (vma_remap(vma_premmaped_start(vma_entry),
|
||||
vma_entry->start, vma_entry_len(vma_entry)))
|
||||
goto core_restore_end;
|
||||
#ifdef CONFIG_VDSO
|
||||
if (vma_entry_is(vma_entry, VMA_AREA_VDSO) ||
|
||||
vma_entry_is(vma_entry, VMA_AREA_VVAR)) {
|
||||
if (vdso_proxify("left dumpee", &args->vdso_sym_rt,
|
||||
args->vdso_rt_parked_at,
|
||||
i, args->tgt_vmas, args->nr_vmas))
|
||||
goto core_restore_end;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Shift private vma-s to the right */
|
||||
@@ -758,15 +749,6 @@ long __export_restore_task(struct task_restore_args *args)
|
||||
if (vma_remap(vma_premmaped_start(vma_entry),
|
||||
vma_entry->start, vma_entry_len(vma_entry)))
|
||||
goto core_restore_end;
|
||||
#ifdef CONFIG_VDSO
|
||||
if (vma_entry_is(vma_entry, VMA_AREA_VDSO) ||
|
||||
vma_entry_is(vma_entry, VMA_AREA_VVAR)) {
|
||||
if (vdso_proxify("right dumpee", &args->vdso_sym_rt,
|
||||
args->vdso_rt_parked_at,
|
||||
i, args->tgt_vmas, args->nr_vmas))
|
||||
goto core_restore_end;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -789,6 +771,22 @@ long __export_restore_task(struct task_restore_args *args)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VDSO
|
||||
/*
|
||||
* Proxify vDSO.
|
||||
*/
|
||||
for (i = 0; i < args->nr_vmas; i++) {
|
||||
if (vma_entry_is(vma_entry, VMA_AREA_VDSO) ||
|
||||
vma_entry_is(vma_entry, VMA_AREA_VVAR)) {
|
||||
if (vdso_proxify("dumpee", &args->vdso_sym_rt,
|
||||
args->vdso_rt_parked_at,
|
||||
i, args->tgt_vmas, args->nr_vmas))
|
||||
goto core_restore_end;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Walk though all VMAs again to drop PROT_WRITE
|
||||
* if it was not there.
|
||||
|
Reference in New Issue
Block a user