* [Qemu-devel] [PATCH] qemu:virtio-net: Check return size on the correct sg list
@ 2009-03-11 22:27 Alex Williamson
2009-03-13 16:20 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2009-03-11 22:27 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.williamson
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>
---
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);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Qemu-devel] [PATCH] qemu:virtio-net: Check return size on the correct sg list
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
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2009-03-13 16:20 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.williamson
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);
> }
>
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-13 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).