Commit 09061850 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

sh: fix ptrace copy_from/to_user() compilation error

This patch makes the 32-bit ptrace code compile again.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent c1a34e4c
...@@ -220,7 +220,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -220,7 +220,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
dp = ((unsigned long) child) + THREAD_SIZE - dp = ((unsigned long) child) + THREAD_SIZE -
sizeof(struct pt_dspregs); sizeof(struct pt_dspregs);
if (*((int *) (dp - 4)) == SR_FD) { if (*((int *) (dp - 4)) == SR_FD) {
copy_to_user(addr, (void *) dp, copy_to_user((void *)addr, (void *) dp,
sizeof(struct pt_dspregs)); sizeof(struct pt_dspregs));
ret = 0; ret = 0;
} }
...@@ -234,7 +234,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -234,7 +234,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
dp = ((unsigned long) child) + THREAD_SIZE - dp = ((unsigned long) child) + THREAD_SIZE -
sizeof(struct pt_dspregs); sizeof(struct pt_dspregs);
if (*((int *) (dp - 4)) == SR_FD) { if (*((int *) (dp - 4)) == SR_FD) {
copy_from_user((void *) dp, addr, copy_from_user((void *) dp, (void *)addr,
sizeof(struct pt_dspregs)); sizeof(struct pt_dspregs));
ret = 0; ret = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment