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/parisc/kernel | |
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/parisc/kernel')
-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 8a0db376e91e..26ec774c5027 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) | |||
87 | switch (request) { | 87 | switch (request) { |
88 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | 88 | case PTRACE_PEEKTEXT: /* read word at location addr. */ |
89 | case PTRACE_PEEKDATA: { | 89 | case PTRACE_PEEKDATA: { |
90 | int copied; | ||
91 | |||
92 | #ifdef CONFIG_64BIT | 90 | #ifdef CONFIG_64BIT |
93 | if (__is_compat_task(child)) { | 91 | if (__is_compat_task(child)) { |
92 | int copied; | ||
94 | unsigned int tmp; | 93 | unsigned int tmp; |
95 | 94 | ||
96 | addr &= 0xffffffffL; | 95 | addr &= 0xffffffffL; |
@@ -105,15 +104,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
105 | } | 104 | } |
106 | else | 105 | else |
107 | #endif | 106 | #endif |
108 | { | 107 | ret = generic_ptrace_peekdata(child, addr, data); |
109 | unsigned long tmp; | ||
110 | |||
111 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | ||
112 | ret = -EIO; | ||
113 | if (copied != sizeof(tmp)) | ||
114 | goto out_tsk; | ||
115 | ret = put_user(tmp,(unsigned long *) data); | ||
116 | } | ||
117 | goto out_tsk; | 108 | goto out_tsk; |
118 | } | 109 | } |
119 | 110 | ||