Commit c2dec75b authored by Pavel Emelyanov's avatar Pavel Emelyanov

dump: Add comment why get_task_regs for task is in such a strange place

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d20089fb
......@@ -959,6 +959,12 @@ static int parasite_start_daemon(struct parasite_ctl *ctl, struct pstree_item *i
{
pid_t pid = ctl->pid.real;
/*
* Get task registers before going daemon, since the
* get_task_regs needs to call ptrace on _stopped_ task,
* while in daemon it is not such.
*/
if (get_task_regs(pid, ctl->regs_orig, item->core[0])) {
pr_err("Can't obtain regs for thread %d\n", pid);
return -1;
......
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