Skip to content

Commit 2941a47

Browse files
jasowanggeertu
authored andcommitted
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: 7124330 ("m68k/uaccess: Revive 64-bit get_user()") Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent b2003c7 commit 2941a47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/m68k/include/asm/uaccess_mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ asm volatile ("\n" \
142142
__get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \
143143
break; \
144144
case 8: { \
145-
const void *__gu_ptr = (ptr); \
145+
const void __user *__gu_ptr = (ptr); \
146146
union { \
147147
u64 l; \
148148
__typeof__(*(ptr)) t; \

0 commit comments

Comments
 (0)