diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 2bf27f364d09..8182f45ca493 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -767,12 +767,20 @@ long arch_ptrace(struct task_struct *child, long request, | |||
767 | 767 | ||
768 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 768 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
769 | case PTRACE_GETHBPREGS: | 769 | case PTRACE_GETHBPREGS: |
770 | if (ptrace_get_breakpoints(child) < 0) | ||
771 | return -ESRCH; | ||
772 | |||
770 | ret = ptrace_gethbpregs(child, addr, | 773 | ret = ptrace_gethbpregs(child, addr, |
771 | (unsigned long __user *)data); | 774 | (unsigned long __user *)data); |
775 | ptrace_put_breakpoints(child); | ||
772 | break; | 776 | break; |
773 | case PTRACE_SETHBPREGS: | 777 | case PTRACE_SETHBPREGS: |
778 | if (ptrace_get_breakpoints(child) < 0) | ||
779 | return -ESRCH; | ||
780 | |||
774 | ret = ptrace_sethbpregs(child, addr, | 781 | ret = ptrace_sethbpregs(child, addr, |
775 | (unsigned long __user *)data); | 782 | (unsigned long __user *)data); |
783 | ptrace_put_breakpoints(child); | ||
776 | break; | 784 | break; |
777 | #endif | 785 | #endif |
778 | 786 | ||