]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ptrace/arm: revert "hw_breakpoints: Fix racy access to ptrace breakpoints"
authorOleg Nesterov <oleg@redhat.com>
Wed, 19 Jun 2013 00:08:13 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:37 +0000 (17:27 +1000)
This reverts commit bf0b8f4b55e ("hw_breakpoints: Fix racy access to
ptrace breakpoints").

The patch was fine but we can no longer race with SIGKILL after 9899d11f
("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 <oleg@redhat.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arm/kernel/ptrace.c

index 03deeffd9f6d06e6ff380126592e10dbf7bf1a25..41668e56685fa212bbb2a2a3da1daf6bbb4d0fe0 100644 (file)
@@ -886,20 +886,12 @@ long arch_ptrace(struct task_struct *child, long request,
 
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
                case PTRACE_GETHBPREGS:
-                       if (ptrace_get_breakpoints(child) < 0)
-                               return -ESRCH;
-
                        ret = ptrace_gethbpregs(child, addr,
                                                (unsigned long __user *)data);
-                       ptrace_put_breakpoints(child);
                        break;
                case PTRACE_SETHBPREGS:
-                       if (ptrace_get_breakpoints(child) < 0)
-                               return -ESRCH;
-
                        ret = ptrace_sethbpregs(child, addr,
                                                (unsigned long __user *)data);
-                       ptrace_put_breakpoints(child);
                        break;
 #endif