[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201608020421.YLTUHq02%fengguang.wu@intel.com>
Date: Tue, 2 Aug 2016 04:03:23 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Jason Wang <jasowang@...hat.com>
Cc: kbuild-all@...org, kvm@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
"Michael S. Tsirkin" <mst@...hat.com>
Subject: [vhost:vhost 14/14] drivers/vhost/vhost.c:915:30: warning: passing
argument 2 of 'access_ok' makes pointer from integer without a cast
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
Download attachment ".config.gz" of type "application/octet-stream" (46360 bytes)
Powered by blists - more mailing lists