提交 2941a473 编写于 作者: J Jason Wang 提交者: Geert Uytterhoeven

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: Nkbuild test robot <lkp@intel.com>
Signed-off-by: NJason Wang <jasowang@redhat.com>
Acked-by: NMichael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20200520065750.8401-1-jasowang@redhat.com
Fixes: 7124330d ("m68k/uaccess: Revive 64-bit get_user()")
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 b2003c7a
...@@ -142,7 +142,7 @@ asm volatile ("\n" \ ...@@ -142,7 +142,7 @@ asm volatile ("\n" \
__get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \ __get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \
break; \ break; \
case 8: { \ case 8: { \
const void *__gu_ptr = (ptr); \ const void __user *__gu_ptr = (ptr); \
union { \ union { \
u64 l; \ u64 l; \
__typeof__(*(ptr)) t; \ __typeof__(*(ptr)) t; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册