qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu:virtio-net: Check return size on the corre


From: Anthony Liguori
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
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

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 <address@hidden>

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);
         }









reply via email to

[Prev in Thread] Current Thread [Next in Thread]