diff options
Diffstat (limited to 'arch/avr32/kernel/ptrace.c')
-rw-r--r-- | arch/avr32/kernel/ptrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index ecea9b6bfab4..4aedcab7cd4b 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -150,6 +150,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
150 | unsigned long addr, unsigned long data) | 150 | unsigned long addr, unsigned long data) |
151 | { | 151 | { |
152 | int ret; | 152 | int ret; |
153 | void __user *datap = (void __user *) data; | ||
153 | 154 | ||
154 | switch (request) { | 155 | switch (request) { |
155 | /* Read the word at location addr in the child process */ | 156 | /* Read the word at location addr in the child process */ |
@@ -159,8 +160,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
159 | break; | 160 | break; |
160 | 161 | ||
161 | case PTRACE_PEEKUSR: | 162 | case PTRACE_PEEKUSR: |
162 | ret = ptrace_read_user(child, addr, | 163 | ret = ptrace_read_user(child, addr, datap); |
163 | (unsigned long __user *)data); | ||
164 | break; | 164 | break; |
165 | 165 | ||
166 | /* Write the word in data at location addr */ | 166 | /* Write the word in data at location addr */ |
@@ -174,11 +174,11 @@ long arch_ptrace(struct task_struct *child, long request, | |||
174 | break; | 174 | break; |
175 | 175 | ||
176 | case PTRACE_GETREGS: | 176 | case PTRACE_GETREGS: |
177 | ret = ptrace_getregs(child, (void __user *)data); | 177 | ret = ptrace_getregs(child, datap); |
178 | break; | 178 | break; |
179 | 179 | ||
180 | case PTRACE_SETREGS: | 180 | case PTRACE_SETREGS: |
181 | ret = ptrace_setregs(child, (const void __user *)data); | 181 | ret = ptrace_setregs(child, datap); |
182 | break; | 182 | break; |
183 | 183 | ||
184 | default: | 184 | default: |