All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Jason Wang <jasowang@redhat.com>,
	eric.auger.pro@gmail.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, kvm@vger.kernel.org, mst@redhat.com,
	kvmarm@lists.cs.columbia.edu
Cc: stefanha@redhat.com
Subject: Re: [PATCH] vhost: Fix vhost_copy_to_user()
Date: Wed, 11 Apr 2018 15:45:59 +0200	[thread overview]
Message-ID: <355234b2-651e-4e85-b5d2-d92bb6e33f13@redhat.com> (raw)
In-Reply-To: <85c033b9-b230-7ef9-744c-4e2799684609@redhat.com>

Hi Jason,

On 11/04/18 15:44, Jason Wang wrote:
> 
> 
> On 2018年04月11日 21:30, Eric Auger wrote:
>> vhost_copy_to_user is used to copy vring used elements to userspace.
>> We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC.
>>
>> Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache")
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>>
>> ---
>>
>> This fixes a stall observed when running an aarch64 guest with
>> virtual smmu
>> ---
>>   drivers/vhost/vhost.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
>> index bec722e..f44aead 100644
>> --- a/drivers/vhost/vhost.c
>> +++ b/drivers/vhost/vhost.c
>> @@ -744,7 +744,7 @@ static int vhost_copy_to_user(struct
>> vhost_virtqueue *vq, void __user *to,
>>           struct iov_iter t;
>>           void __user *uaddr = vhost_vq_meta_fetch(vq,
>>                        (u64)(uintptr_t)to, size,
>> -                     VHOST_ADDR_DESC);
>> +                     VHOST_ADDR_USED);
>>             if (uaddr)
>>               return __copy_to_user(uaddr, from, size);
> 
> Acked-by: Jason Wang <jasowang@redhat.com>
> 
> Thanks!
> 
> Stable material I think.

yes I think so.

Thanks

Eric

  reply	other threads:[~2018-04-11 13:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 13:30 [PATCH] vhost: Fix vhost_copy_to_user() Eric Auger
2018-04-11 13:44 ` Jason Wang
2018-04-11 13:44 ` Jason Wang
2018-04-11 13:45   ` Auger Eric [this message]
2018-04-11 13:45   ` Auger Eric
2018-04-11 13:51 ` Michael S. Tsirkin
2018-04-11 13:51   ` Michael S. Tsirkin

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=355234b2-651e-4e85-b5d2-d92bb6e33f13@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanha@redhat.com \
    --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 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.