diff options
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/kernel/ptrace.c | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index abbeaf8f6d0a..ed4d0756c5db 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -570,7 +570,7 @@ withdraw_debug_trap(struct pt_regs *regs) | |||
570 | } | 570 | } |
571 | } | 571 | } |
572 | 572 | ||
573 | static void | 573 | void |
574 | init_debug_traps(struct task_struct *child) | 574 | init_debug_traps(struct task_struct *child) |
575 | { | 575 | { |
576 | struct debug_trap *p = &child->thread.debug_trap; | 576 | struct debug_trap *p = &child->thread.debug_trap; |
@@ -593,8 +593,8 @@ void ptrace_disable(struct task_struct *child) | |||
593 | /* nothing to do.. */ | 593 | /* nothing to do.. */ |
594 | } | 594 | } |
595 | 595 | ||
596 | static int | 596 | long |
597 | do_ptrace(long request, struct task_struct *child, long addr, long data) | 597 | arch_ptrace(struct task_struct *child, long request, long addr, long data) |
598 | { | 598 | { |
599 | int ret; | 599 | int ret; |
600 | 600 | ||
@@ -720,42 +720,6 @@ do_ptrace(long request, struct task_struct *child, long addr, long data) | |||
720 | return ret; | 720 | return ret; |
721 | } | 721 | } |
722 | 722 | ||
723 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data) | ||
724 | { | ||
725 | struct task_struct *child; | ||
726 | int ret; | ||
727 | |||
728 | lock_kernel(); | ||
729 | if (request == PTRACE_TRACEME) { | ||
730 | ret = ptrace_traceme(); | ||
731 | goto out; | ||
732 | } | ||
733 | |||
734 | child = ptrace_get_task_struct(pid); | ||
735 | if (IS_ERR(child)) { | ||
736 | ret = PTR_ERR(child); | ||
737 | goto out; | ||
738 | } | ||
739 | |||
740 | if (request == PTRACE_ATTACH) { | ||
741 | ret = ptrace_attach(child); | ||
742 | if (ret == 0) | ||
743 | init_debug_traps(child); | ||
744 | goto out_tsk; | ||
745 | } | ||
746 | |||
747 | ret = ptrace_check_attach(child, request == PTRACE_KILL); | ||
748 | if (ret == 0) | ||
749 | ret = do_ptrace(request, child, addr, data); | ||
750 | |||
751 | out_tsk: | ||
752 | put_task_struct(child); | ||
753 | out: | ||
754 | unlock_kernel(); | ||
755 | |||
756 | return ret; | ||
757 | } | ||
758 | |||
759 | /* notification of system call entry/exit | 723 | /* notification of system call entry/exit |
760 | * - triggered by current->work.syscall_trace | 724 | * - triggered by current->work.syscall_trace |
761 | */ | 725 | */ |