diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2007-07-17 04:03:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 10:23:03 -0700 |
commit | 7664732315c97f48dba9d1e7339ad16fc5a320ac (patch) | |
tree | 1eb9639b0fbe3f24341cecf1dafcae192cb7bde7 /arch/parisc | |
parent | bcdcd8e725b923ad7c0de809680d5d5658a7bf8c (diff) | |
download | op-kernel-dev-7664732315c97f48dba9d1e7339ad16fc5a320ac.zip op-kernel-dev-7664732315c97f48dba9d1e7339ad16fc5a320ac.tar.gz |
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/parisc')
-rw-r--r-- | arch/parisc/kernel/ptrace.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 8a0db37..26ec774 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c @@ -87,10 +87,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) switch (request) { case PTRACE_PEEKTEXT: /* read word at location addr. */ case PTRACE_PEEKDATA: { - int copied; - #ifdef CONFIG_64BIT if (__is_compat_task(child)) { + int copied; unsigned int tmp; addr &= 0xffffffffL; @@ -105,15 +104,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) } else #endif - { - unsigned long tmp; - - copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); - ret = -EIO; - if (copied != sizeof(tmp)) - goto out_tsk; - ret = put_user(tmp,(unsigned long *) data); - } + ret = generic_ptrace_peekdata(child, addr, data); goto out_tsk; } |