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/avr32/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/avr32/kernel')
-rw-r--r-- | arch/avr32/kernel/ptrace.c | 7 |
1 files changed, 1 insertions, 6 deletions
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) | |||
153 | 153 | ||
154 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 154 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
155 | { | 155 | { |
156 | unsigned long tmp; | ||
157 | int ret; | 156 | int ret; |
158 | 157 | ||
159 | pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", | 158 | 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) | |||
166 | /* Read the word at location addr in the child process */ | 165 | /* Read the word at location addr in the child process */ |
167 | case PTRACE_PEEKTEXT: | 166 | case PTRACE_PEEKTEXT: |
168 | case PTRACE_PEEKDATA: | 167 | case PTRACE_PEEKDATA: |
169 | ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 168 | ret = generic_ptrace_peekdata(child, addr, data); |
170 | if (ret == sizeof(tmp)) | ||
171 | ret = put_user(tmp, (unsigned long __user *)data); | ||
172 | else | ||
173 | ret = -EIO; | ||
174 | break; | 169 | break; |
175 | 170 | ||
176 | case PTRACE_PEEKUSR: | 171 | case PTRACE_PEEKUSR: |