diff options
author | Jason Wang <[email protected]> | 2020-05-20 14:57:50 +0800 |
---|---|---|
committer | Geert Uytterhoeven <[email protected]> | 2020-05-25 10:55:56 +0200 |
commit | 2941a4731fd24d5e43ef437cca90818f87fd4851 (patch) | |
tree | d94984ed2f2b4aa500e67076c6087043441b1dd6 | |
parent | b2003c7a811c765f18d1495c01251c20f9e6c93a (diff) |
m68k: Add missing __user annotation in get_user()
The ptr is a pointer to userspace memory. So we need annotate it with
__user otherwise we may get sparse warnings like:
drivers/vhost/vhost.c:1603:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const *__gu_ptr @@ got unsigned int [noderef] [usertypvoid const *__gu_ptr @@
drivers/vhost/vhost.c:1603:13: sparse: expected void const *__gu_ptr
drivers/vhost/vhost.c:1603:13: sparse: got unsigned int [noderef] [usertype] <asn:1> *idxp
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: 7124330dabe5b3cb ("m68k/uaccess: Revive 64-bit get_user()")
Signed-off-by: Geert Uytterhoeven <[email protected]>
-rw-r--r-- | arch/m68k/include/asm/uaccess_mm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/uaccess_mm.h b/arch/m68k/include/asm/uaccess_mm.h index 7e85de984df1..9ae9f8d05925 100644 --- a/arch/m68k/include/asm/uaccess_mm.h +++ b/arch/m68k/include/asm/uaccess_mm.h @@ -142,7 +142,7 @@ asm volatile ("\n" \ __get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \ break; \ case 8: { \ - const void *__gu_ptr = (ptr); \ + const void __user *__gu_ptr = (ptr); \ union { \ u64 l; \ __typeof__(*(ptr)) t; \ |