[CRIU] [PATCH 4/6] dump: allocate task cores in collect_task() instead of parasite_infect_seized()
Ruslan Kuprieiev
kupruser at gmail.com
Fri Aug 15 06:02:16 PDT 2014
We need it to be able to dump signals into cores
before calling parasite_infect_seized().
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
cr-dump.c | 3 +++
parasite-syscall.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cr-dump.c b/cr-dump.c
index 1700d9d..74a8b4c 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1025,6 +1025,9 @@ static int collect_task(struct pstree_item *item)
goto err_close;
}
+ if (pstree_alloc_cores(item))
+ goto err_close;
+
close_pid_proc();
pr_info("Collected %d in %d state\n", item->pid.real, item->state);
diff --git a/parasite-syscall.c b/parasite-syscall.c
index dad2570..049d323 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -1149,9 +1149,6 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
BUG_ON(item->threads[0].real != pid);
- if (pstree_alloc_cores(item))
- return NULL;
-
ctl = parasite_prep_ctl(pid, vma_area_list);
if (!ctl)
return NULL;
--
1.9.1
More information about the CRIU
mailing list