* [vhost:vhost 14/14] drivers/vhost/vhost.c:915:30: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast
@ 2016-08-01 20:03 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2016-08-01 20:03 UTC (permalink / raw)
To: Jason Wang; +Cc: netdev, Michael S. Tsirkin, kbuild-all, kvm, virtualization
[-- Attachment #1: Type: text/plain, Size: 3000 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 51ce50c54895044f949129e595ed9a37e4d6c13a
commit: 51ce50c54895044f949129e595ed9a37e4d6c13a [14/14] vhost: new device IOTLB API
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 51ce50c54895044f949129e595ed9a37e4d6c13a
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All warnings (new ones prefixed by >>):
drivers/vhost/vhost.c: In function 'umem_access_ok':
>> drivers/vhost/vhost.c:915:30: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [-Wint-conversion]
!access_ok(VERIFY_READ, uaddr, size))
^
In file included from arch/sparc/include/asm/uaccess.h:4:0,
from include/linux/poll.h:11,
from drivers/vhost/vhost.c:21:
arch/sparc/include/asm/uaccess_64.h:79:19: note: expected 'const void *' but argument is of type 'u64 {aka long long unsigned int}'
static inline int access_ok(int type, const void __user * addr, unsigned long size)
^
drivers/vhost/vhost.c:918:31: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [-Wint-conversion]
!access_ok(VERIFY_WRITE, uaddr, size))
^
In file included from arch/sparc/include/asm/uaccess.h:4:0,
from include/linux/poll.h:11,
from drivers/vhost/vhost.c:21:
arch/sparc/include/asm/uaccess_64.h:79:19: note: expected 'const void *' but argument is of type 'u64 {aka long long unsigned int}'
static inline int access_ok(int type, const void __user * addr, unsigned long size)
^
vim +/access_ok +915 drivers/vhost/vhost.c
899 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb;
900 if (msg->iova <= vq_msg->iova &&
901 msg->iova + msg->size - 1 > vq_msg->iova &&
902 vq_msg->type == VHOST_IOTLB_MISS) {
903 vhost_poll_queue(&node->vq->poll);
904 list_del(&node->node);
905 kfree(node);
906 }
907 }
908
909 spin_unlock(&d->iotlb_lock);
910 }
911
912 static int umem_access_ok(u64 uaddr, u64 size, int access)
913 {
914 if ((access & VHOST_ACCESS_RO) &&
> 915 !access_ok(VERIFY_READ, uaddr, size))
916 return -EFAULT;
917 if ((access & VHOST_ACCESS_WO) &&
918 !access_ok(VERIFY_WRITE, uaddr, size))
919 return -EFAULT;
920 return 0;
921 }
922
923 int vhost_process_iotlb_msg(struct vhost_dev *dev,
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46360 bytes --]
[-- Attachment #3: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-01 20:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01 20:03 [vhost:vhost 14/14] drivers/vhost/vhost.c:915:30: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.