From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: alex.williamson@hp.com
Subject: Re: [Qemu-devel] [PATCH] qemu:virtio-net: Check return size on the correct sg list
Date: Fri, 13 Mar 2009 11:20:03 -0500 [thread overview]
Message-ID: <49BA87B3.4030006@us.ibm.com> (raw)
In-Reply-To: <20090311222657.11804.44816.stgit@kvm.aw>
Alex Williamson wrote:
> When checking that the size of the control virtqueue return field
> is sufficient, use the correct sg list.
>
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
>
Applied to stable and trunk. Thanks.
Regards,
Anthony Liguori
> ---
>
> hw/virtio-net.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-net.c b/hw/virtio-net.c
> index e83d101..ad55bb7 100644
> --- a/hw/virtio-net.c
> +++ b/hw/virtio-net.c
> @@ -228,7 +228,7 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
> }
>
> if (elem.out_sg[0].iov_len < sizeof(ctrl) ||
> - elem.out_sg[elem.in_num - 1].iov_len < sizeof(status)) {
> + elem.in_sg[elem.in_num - 1].iov_len < sizeof(status)) {
> fprintf(stderr, "virtio-net ctrl header not in correct element\n");
> exit(1);
> }
>
>
>
>
>
prev parent reply other threads:[~2009-03-13 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 22:27 [Qemu-devel] [PATCH] qemu:virtio-net: Check return size on the correct sg list Alex Williamson
2009-03-13 16:20 ` Anthony Liguori [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=49BA87B3.4030006@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=alex.williamson@hp.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 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).