Commit 5cb0c0d2 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 18fe3575
...@@ -728,15 +728,6 @@ long __export_restore_task(struct task_restore_args *args) ...@@ -728,15 +728,6 @@ long __export_restore_task(struct task_restore_args *args)
if (vma_remap(vma_premmaped_start(vma_entry), if (vma_remap(vma_premmaped_start(vma_entry),
vma_entry->start, vma_entry_len(vma_entry))) vma_entry->start, vma_entry_len(vma_entry)))
goto core_restore_end; 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 */ /* Shift private vma-s to the right */
...@@ -758,15 +749,6 @@ long __export_restore_task(struct task_restore_args *args) ...@@ -758,15 +749,6 @@ long __export_restore_task(struct task_restore_args *args)
if (vma_remap(vma_premmaped_start(vma_entry), if (vma_remap(vma_premmaped_start(vma_entry),
vma_entry->start, vma_entry_len(vma_entry))) vma_entry->start, vma_entry_len(vma_entry)))
goto core_restore_end; 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) ...@@ -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 * Walk though all VMAs again to drop PROT_WRITE
* if it was not there. * if it was not there.
......
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