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/s390/kernel/ptrace.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/s390/kernel') diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 2a8f0872ea8..28afff4e5d1 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c @@ -294,7 +294,6 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) static int do_ptrace_normal(struct task_struct *child, long request, long addr, long data) { - unsigned long tmp; ptrace_area parea; int copied, ret; @@ -304,10 +303,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data) /* Remove high order bit from address (only for 31 bit). */ addr &= PSW_ADDR_INSN; /* read word at location addr. */ - copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); - if (copied != sizeof(tmp)) - return -EIO; - return put_user(tmp, (unsigned long __force __user *) data); + return generic_ptrace_peekdata(child, addr, data); case PTRACE_PEEKUSR: /* read the word at location addr in the USER area. */ -- cgit v1.2.3