ptrace/sh: revert "hw_breakpoints: Fix racy access to ptrace breakpoints"
authorOleg Nesterov <[email protected]>
Mon, 8 Jul 2013 23:00:52 +0000 (16:00 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 Jul 2013 17:33:26 +0000 (10:33 -0700)
This reverts commit e0ac8457d020 ("hw_breakpoints: Fix racy access to
ptrace breakpoints").

The patch was fine but we can no longer race with SIGKILL after commit
9899d11f6544 ("ptrace: ensure arch_ptrace/ptrace_request can never race
with SIGKILL"), the __TASK_TRACED tracee can't be woken up and
->ptrace_bps[] can't go away.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jan Kratochvil <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Prasad <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/sh/kernel/ptrace_32.c

index 81f999a672f68b88b547e013d3d25e0c4a8557f4..668c81631c083d352dd50b3afc63193708d44eac 100644 (file)
@@ -117,11 +117,7 @@ void user_enable_single_step(struct task_struct *child)
 
        set_tsk_thread_flag(child, TIF_SINGLESTEP);
 
-       if (ptrace_get_breakpoints(child) < 0)
-               return;
-
        set_single_step(child, pc);
-       ptrace_put_breakpoints(child);
 }
 
 void user_disable_single_step(struct task_struct *child)