[PATCH 2/6] powerpc/kernel: Drop annotation for generic, unannotated function
Daniel Axtens
dja at axtens.net
Mon Jul 4 17:09:38 AEST 2016
Sadly, access_process_vm takes an unsigned long, rather than a void
__user *. Worse, it's a generic kernel function: changing it would be
a massive, kernel-wide effort.
So, __force the annotation away.
Signed-off-by: Daniel Axtens <dja at axtens.net>
---
arch/powerpc/kernel/ptrace32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index f52b7db327c8..c2eb319a9239 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -73,7 +73,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
break;
- copied = access_process_vm(child, (u64)addrOthers, &tmp,
+ copied = access_process_vm(child, (u64 __force)addrOthers, &tmp,
sizeof(tmp), 0);
if (copied != sizeof(tmp))
break;
@@ -178,7 +178,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
break;
ret = 0;
- if (access_process_vm(child, (u64)addrOthers, &tmp,
+ if (access_process_vm(child, (u64 __force)addrOthers, &tmp,
sizeof(tmp), 1) == sizeof(tmp))
break;
ret = -EIO;
--
2.1.4
More information about the Linuxppc-dev
mailing list