ptrace_report_syscall_exit() is the only callback which changes ctx->resume.
Remove this, this is unnecessary. We know that ptrace_report_signal() will
be called before any other callback, and UTRACE_SIGNAL_HANDLER is not
possible.

With this change the tracer owns ctx->resume, it can always change it safely
even if the tracee is not stopped (implicit detach).

Signed-off-by: Oleg Nesterov <o...@redhat.com>
---

 kernel/ptrace-utrace.c |    1 -
 1 file changed, 1 deletion(-)

--- kstub/kernel/ptrace-utrace.c~2_tracer_owns_resume   2010-09-20 
03:53:30.000000000 +0200
+++ kstub/kernel/ptrace-utrace.c        2010-09-20 03:53:31.000000000 +0200
@@ -429,7 +429,6 @@ static u32 ptrace_report_syscall_exit(u3
        if (ctx->resume != UTRACE_RESUME) {
                WARN_ON(ctx->resume != UTRACE_BLOCKSTEP &&
                        ctx->resume != UTRACE_SINGLESTEP);
-               ctx->resume = UTRACE_RESUME;
 
                ctx->signr = SIGTRAP;
                return UTRACE_INTERRUPT;

Reply via email to