[PATCH 5/5] ptrace-utrace: fix exit_ptrace() vs ptrace_report_signal() races

2010-12-10 Thread Oleg Nesterov
Finally, the actual fix. ptrace_detach_task(sig = -1) is very buggy. Somehow I completely forgot that implicit detach can race with the running tracee. Depending on how exactly it races with ptrace_report_signal() we can have the following problems: 1) If the tracer exits right after

[PATCH 5/5] ptrace:

2009-11-10 Thread Oleg Nesterov
Unlike powepc, x86 always calls tracehook_report_syscall_exit(step) with step = 0, and sends the trap by hand. This results in unnecessary SIGTRAP when PTRACE_SINGLESTEP follows the syscall-exit stop. Change syscall_trace_leave() to pass the correct step argument to tracehook and remove the