From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753418AbcLGERe (ORCPT ); Tue, 6 Dec 2016 23:17:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbcLGERc (ORCPT ); Tue, 6 Dec 2016 23:17:32 -0500 Subject: Re: [PATCH 06/10] vhost: add missing __user annotations To: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org References: <1481038106-24899-1-git-send-email-mst@redhat.com> <1481038106-24899-7-git-send-email-mst@redhat.com> Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org From: Jason Wang Message-ID: Date: Wed, 7 Dec 2016 12:17:27 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481038106-24899-7-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 07 Dec 2016 04:17:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年12月06日 23:40, Michael S. Tsirkin wrote: > Several vhost functions were missing __user annotations > on pointers, causing sparse warnings. Fix this up. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/vhost.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index 7331ef3..ba7db68 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -719,7 +719,7 @@ static int memory_access_ok(struct vhost_dev *d, struct vhost_umem *umem, > static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len, > struct iovec iov[], int iov_size, int access); > > -static int vhost_copy_to_user(struct vhost_virtqueue *vq, void *to, > +static int vhost_copy_to_user(struct vhost_virtqueue *vq, void __user *to, > const void *from, unsigned size) > { > int ret; > @@ -749,7 +749,7 @@ static int vhost_copy_to_user(struct vhost_virtqueue *vq, void *to, > } > > static int vhost_copy_from_user(struct vhost_virtqueue *vq, void *to, > - void *from, unsigned size) > + void __user *from, unsigned size) > { > int ret; > > @@ -783,7 +783,7 @@ static int vhost_copy_from_user(struct vhost_virtqueue *vq, void *to, > } > > static void __user *__vhost_get_user(struct vhost_virtqueue *vq, > - void *addr, unsigned size) > + void __user *addr, unsigned size) > { > int ret; > > @@ -934,8 +934,8 @@ static int umem_access_ok(u64 uaddr, u64 size, int access) > return 0; > } > > -int vhost_process_iotlb_msg(struct vhost_dev *dev, > - struct vhost_iotlb_msg *msg) > +static int vhost_process_iotlb_msg(struct vhost_dev *dev, > + struct vhost_iotlb_msg *msg) > { > int ret = 0; > Patch looks good but this looks like another static conversion not __user annotations.