From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: kbuild test robot <lkp@intel.com>,
kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] vhost: missing __user tags
Date: Mon, 18 May 2020 11:27:37 +0800 [thread overview]
Message-ID: <f6d7e432-0951-8c3f-829e-78466fd39446@redhat.com> (raw)
In-Reply-To: <20200515153347.1092235-1-mst@redhat.com>
On 2020/5/15 下午11:33, Michael S. Tsirkin wrote:
> sparse warns about converting void * to void __user *. This is not new
> but only got noticed now that vhost is built on more systems.
> This is just a question of __user tags missing in a couple of places,
> so fix it up.
>
> Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/vhost/vhost.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index d450e16c5c25..21a59b598ed8 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -730,7 +730,7 @@ static inline void __user *vhost_vq_meta_fetch(struct vhost_virtqueue *vq,
> if (!map)
> return NULL;
>
> - return (void *)(uintptr_t)(map->addr + addr - map->start);
> + return (void __user *)(uintptr_t)(map->addr + addr - map->start);
> }
>
> /* Can we switch to this memory table? */
> @@ -869,7 +869,7 @@ static void __user *__vhost_get_user_slow(struct vhost_virtqueue *vq,
> * not happen in this case.
> */
> static inline void __user *__vhost_get_user(struct vhost_virtqueue *vq,
> - void *addr, unsigned int size,
> + void __user *addr, unsigned int size,
> int type)
> {
> void __user *uaddr = vhost_vq_meta_fetch(vq,
Acked-by: Jason Wang <jasowang@redhat.com>
prev parent reply other threads:[~2020-05-18 3:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 15:33 [PATCH] vhost: missing __user tags Michael S. Tsirkin
2020-05-18 3:27 ` Jason Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6d7e432-0951-8c3f-829e-78466fd39446@redhat.com \
--to=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).