Commit aac9fd5b authored by Ruslan Kuprieiev's avatar Ruslan Kuprieiev Committed by Pavel Emelyanov

dump: allocate task cores in collect_task() instead of parasite_infect_seized()

We need it to be able to dump signals into cores
before calling parasite_infect_seized().
Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 60ef59c7
...@@ -1014,6 +1014,9 @@ static int collect_task(struct pstree_item *item) ...@@ -1014,6 +1014,9 @@ static int collect_task(struct pstree_item *item)
goto err_close; goto err_close;
} }
if (pstree_alloc_cores(item))
goto err_close;
close_pid_proc(); close_pid_proc();
pr_info("Collected %d in %d state\n", item->pid.real, item->state); pr_info("Collected %d in %d state\n", item->pid.real, item->state);
......
...@@ -1160,9 +1160,6 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item, ...@@ -1160,9 +1160,6 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
BUG_ON(item->threads[0].real != pid); BUG_ON(item->threads[0].real != pid);
if (pstree_alloc_cores(item))
return NULL;
ctl = parasite_prep_ctl(pid, vma_area_list); ctl = parasite_prep_ctl(pid, vma_area_list);
if (!ctl) if (!ctl)
return NULL; return NULL;
......
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