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/m68k/kernel/ptrace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch/m68k') diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index cdba9fd6d82f..01a3a09c53d9 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c @@ -128,10 +128,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) /* when I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ case PTRACE_PEEKDATA: - i = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); - if (i != sizeof(tmp)) - goto out_eio; - ret = put_user(tmp, (unsigned long *)data); + ret = generic_ptrace_peekdata(child, addr, data); break; /* read the word at location addr in the USER area. */ -- cgit v1.2.3-58-ga151