All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Jia He <hejianet@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Jia He <jia.he@hxt-semitech.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] vhost: fix incorrect check in vhost_verify_ring_mappings
Date: Wed, 28 Feb 2018 19:00:03 +0000	[thread overview]
Message-ID: <20180228190003.GM2981@work-vm> (raw)
In-Reply-To: <1519810529-4034-2-git-send-email-hejianet@gmail.com>

* Jia He (hejianet@gmail.com) wrote:
> In commit 0ca1fd2d6878 ("vhost: Simplify ring verification checks"),
> it checks the virtqueue desc mapping for 3 times.
> 
> Fixed: commit 0ca1fd2d6878 ("vhost: Simplify ring verification checks")
> Signed-off-by: Jia He <jia.he@hxt-semitech.com>

Oops, well spotted; copy & paste strikes again.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  hw/virtio/vhost.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 00f2512..bbf6c0c 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -359,7 +359,7 @@ static int vhost_verify_ring_mappings(struct vhost_dev *dev,
>  
>          j++;
>          r = vhost_verify_ring_part_mapping(
> -                vq->desc, vq->desc_phys, vq->desc_size,
> +                vq->avail, vq->avail_phys, vq->avail_size,
>                  reg_hva, reg_gpa, reg_size);
>          if (r) {
>              break;
> @@ -367,7 +367,7 @@ static int vhost_verify_ring_mappings(struct vhost_dev *dev,
>  
>          j++;
>          r = vhost_verify_ring_part_mapping(
> -                vq->desc, vq->desc_phys, vq->desc_size,
> +                vq->used, vq->used_phys, vq->used_size,
>                  reg_hva, reg_gpa, reg_size);
>          if (r) {
>              break;
> -- 
> 2.7.4
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

      reply	other threads:[~2018-02-28 19:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  9:35 [Qemu-devel] [PATCH 1/2] vhost: avoid to start/stop virtqueue which is not ready Jia He
2018-02-28  9:35 ` [Qemu-devel] [PATCH 2/2] vhost: fix incorrect check in vhost_verify_ring_mappings Jia He
2018-02-28 19:00   ` Dr. David Alan Gilbert [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=20180228190003.GM2981@work-vm \
    --to=dgilbert@redhat.com \
    --cc=hejianet@gmail.com \
    --cc=jia.he@hxt-semitech.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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.