diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2007-07-17 07:03:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:03 -0400 |
commit | 7664732315c97f48dba9d1e7339ad16fc5a320ac (patch) | |
tree | 1eb9639b0fbe3f24341cecf1dafcae192cb7bde7 /arch/arm | |
parent | bcdcd8e725b923ad7c0de809680d5d5658a7bf8c (diff) |
PTRACE_PEEKDATA consolidation
Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata()
function.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 6f2f46c2e406..9a5d9754c2a2 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -657,7 +657,6 @@ static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp) | |||
657 | 657 | ||
658 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 658 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
659 | { | 659 | { |
660 | unsigned long tmp; | ||
661 | int ret; | 660 | int ret; |
662 | 661 | ||
663 | switch (request) { | 662 | switch (request) { |
@@ -666,12 +665,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
666 | */ | 665 | */ |
667 | case PTRACE_PEEKTEXT: | 666 | case PTRACE_PEEKTEXT: |
668 | case PTRACE_PEEKDATA: | 667 | case PTRACE_PEEKDATA: |
669 | ret = access_process_vm(child, addr, &tmp, | 668 | ret = generic_ptrace_peekdata(child, addr, data); |
670 | sizeof(unsigned long), 0); | ||
671 | if (ret == sizeof(unsigned long)) | ||
672 | ret = put_user(tmp, (unsigned long __user *) data); | ||
673 | else | ||
674 | ret = -EIO; | ||
675 | break; | 669 | break; |
676 | 670 | ||
677 | case PTRACE_PEEKUSR: | 671 | case PTRACE_PEEKUSR: |