From 7664732315c97f48dba9d1e7339ad16fc5a320ac Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 17 Jul 2007 04:03:43 -0700 Subject: PTRACE_PEEKDATA consolidation Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata() function. Signed-off-by: Alexey Dobriyan Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/avr32/kernel/ptrace.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'arch/avr32/kernel/ptrace.c') diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 3c36c2d16148..1043fdc2df7f 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c @@ -153,7 +153,6 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs) long arch_ptrace(struct task_struct *child, long request, long addr, long data) { - unsigned long tmp; int ret; pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", @@ -166,11 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) /* Read the word at location addr in the child process */ case PTRACE_PEEKTEXT: case PTRACE_PEEKDATA: - ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); - if (ret == sizeof(tmp)) - ret = put_user(tmp, (unsigned long __user *)data); - else - ret = -EIO; + ret = generic_ptrace_peekdata(child, addr, data); break; case PTRACE_PEEKUSR: -- cgit v1.2.3