[CRIU] [PATCH] dump: initilize vmas in the very beginning
Ruslan Kuprieiev
kupruser at gmail.com
Wed Oct 2 06:25:05 PDT 2013
Hi!
When dump/pre-dump failed before initializing vmas, free_mappings(&vmas)
is called and this cause segfault. Lets initialize vmas in the very
beginning of dump.
Signed-off-by: Ruslan Kuprieiev <kurpuser at gmail.com>
-------------- next part --------------
---
diff --git a/cr-dump.c b/cr-dump.c
index 8e8d332..97ba2d0 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1296,6 +1296,9 @@ static int pre_dump_one_task(struct pstree_item *item, struct list_head *ctls)
int ret = -1;
struct parasite_dump_misc misc;
+ INIT_LIST_HEAD(&vmas.h);
+ vmas.nr = 0;
+
pr_info("========================================\n");
pr_info("Pre-dumping task (pid: %d)\n", pid);
pr_info("========================================\n");
@@ -1359,6 +1362,9 @@ static int dump_one_task(struct pstree_item *item)
struct proc_posix_timers_stat proc_args;
struct proc_status_creds cr;
+ INIT_LIST_HEAD(&vmas.h);
+ vmas.nr = 0;
+
pr_info("========================================\n");
pr_info("Dumping task (pid: %d)\n", pid);
pr_info("========================================\n");
More information about the CRIU
mailing list