[CRIU] [PATCH 12/13] vdso: Escape double dumping of rt-vdso if proxy present
Pavel Emelyanov
xemul at parallels.com
Thu May 23 07:11:37 EDT 2013
On 05/22/2013 11:09 PM, Cyrill Gorcunov wrote:
>
> In case if we have created vdso proxy the rt-vdso should
> not be dumped because it will be re-created on next restore
> anyway. Thus with help of parasite service routine find
> the rt-vdso and tear it off from VMAs list.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> cr-dump.c | 7 +++
> include/parasite-syscall.h | 3 ++
> include/parasite.h | 8 ++++
> include/vdso.h | 6 +++
> parasite-syscall.c | 104 +++++++++++++++++++++++++++++++++++++++++++++
> pie/parasite.c | 18 ++++++++
> vdso.c | 5 +++
> 7 files changed, 151 insertions(+)
>
> + if (marked) {
> + pr_debug("vdso: Found marked at %lx (proxy at %lx)\n",
> + (long)marked->vma.start, (long)proxy_addr);
> +
> + /*
> + * Don't forget to restore the proxy vdso status, since
> + * it's being not recognized by the kernel as vdso.
> + */
> + list_for_each_entry(vma, &vma_area_list->h, list) {
> + if (vma->vma.start == proxy_addr) {
> + vma->vma.status |= VMA_AREA_REGULAR | VMA_AREA_VDSO;
> + pr_debug("vdso: Restore proxy status at %lx\n",
> + (long)vma->vma.start);
> + break;
> + }
> + }
> +
> + pr_debug("vdso: Droppping marked vdso at %lx\n",
> + (long)vma->vma.start);
> + list_del(&vma->list);
> + xfree(vma);
Wrong vma removed?
> + }
More information about the CRIU
mailing list