ptrace_disable() is called when the tracee is quiescent and we are going to untrace. This means we are going to clear ->ptrace and wake up the tracee. Now that ptrace_stop() checks PT_ bits and does user_disable_single_step() we can remove this code from ptrace_disable(), it is unneeded and not utrace-friendly.
TODO: change !x86 code. Signed-off-by: Oleg Nesterov <o...@redhat.com> --- arch/x86/kernel/ptrace.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 7ab475f..f1cdc7d 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c @@ -807,8 +807,6 @@ static int ioperm_get(struct task_struct *target, */ void ptrace_disable(struct task_struct *child) { - child->ptrace &= ~(PT_SINGLE_STEP | PT_SINGLE_BLOCK); - user_disable_single_step(child); #ifdef TIF_SYSCALL_EMU clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); #endif -- 1.5.5.1