From 2ec003eb859cea397dc84db31f067856df4e39cd Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 14 Jan 2014 12:03:00 +0400 Subject: [PATCH] predump: Spot the VDSO page/vma in victim task While doing pre-dump we don't do proper VDSO fixups, thus at this stage we may fail the should_dump_page() checks -- it will tread VDSO pages are 'regular' and may skip dumping some of them. This is not bad as is, but the subsequent dump will properly spot VDSO are and will try to dump _all_ pages from it. And if checks for soft-dirty will report that some pages are clean, dump will try to locate those in parent images and would fail. Acked-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- cr-dump.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cr-dump.c b/cr-dump.c index 66a5913ad..b80cfa813 100644 --- a/cr-dump.c +++ b/cr-dump.c @@ -1334,6 +1334,12 @@ static int pre_dump_one_task(struct pstree_item *item, struct list_head *ctls) goto err_free; } + ret = parasite_fixup_vdso(parasite_ctl, pid, &vmas); + if (ret) { + pr_err("Can't fixup vdso VMAs (pid: %d)\n", pid); + goto err_cure; + } + ret = parasite_dump_misc_seized(parasite_ctl, &misc); if (ret) { pr_err("Can't dump misc (pid: %d)\n", pid); @@ -1602,6 +1608,9 @@ int cr_pre_dump_tasks(pid_t pid) if (kerndat_init()) goto err; + if (vdso_init()) + goto err; + if (connect_to_page_server()) goto err;