Commit 0a77f4f1 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

parasite: Get rid of redundant PTRACE_INTERRUPT/PTRACE_CONT tail

The tail PTRACE_INTERRUPT/PTRACE_CONT call in parasite calling code
is redundant as far as I can say, thus get rid of it.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4eb37687
......@@ -185,39 +185,9 @@ retry_signal:
}
/*
* Our code is done.
* We've reached this point iif int3 is triggered inside our
* parasite code. So we're done.
*/
if (ptrace(PTRACE_INTERRUPT, pid, NULL, NULL)) {
pr_err("Can't interrupt (pid: %d)\n", pid);
goto err;
}
if (ptrace(PTRACE_CONT, pid, NULL, NULL)) {
pr_err("Can't continue (pid: %d)\n", pid);
goto err;
}
if (wait4(pid, &status, __WALL, NULL) != pid) {
pr_err("Waited pid mismatch (pid: %d)\n", pid);
goto err;
}
if (!WIFSTOPPED(status)) {
pr_err("Task is still running (pid: %d)\n", pid);
goto err;
}
if (ptrace(PTRACE_GETSIGINFO, pid, NULL, &siginfo)) {
pr_err("Can't get siginfo (pid: %d)\n", pid);
goto err;
}
if (SI_EVENT(siginfo.si_code) != PTRACE_EVENT_STOP) {
pr_err("si_code doesn't match (pid: %d si_code: %d)\n",
pid, siginfo.si_code);
goto err;
}
ret = 0;
err:
return ret;
......
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