[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/7] virtio-net: handle virtio_net_handle_ctrl() err
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH 3/7] virtio-net: handle virtio_net_handle_ctrl() error |
Date: |
Wed, 21 Sep 2016 15:14:17 +0200 |
User-agent: |
StGit/0.17.1-dirty |
This error is caused by a buggy guest: let's switch the device to the
broken state instead of terminating QEMU.
Signed-off-by: Greg Kurz <address@hidden>
---
hw/net/virtio-net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 01f1351554aa..68a448acd81b 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -892,8 +892,8 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev,
VirtQueue *vq)
}
if (iov_size(elem->in_sg, elem->in_num) < sizeof(status) ||
iov_size(elem->out_sg, elem->out_num) < sizeof(ctrl)) {
- error_report("virtio-net ctrl missing headers");
- exit(1);
+ virtio_error(vdev, "virtio-net ctrl missing headers");
+ return;
}
iov_cnt = elem->out_num;
- [Qemu-devel] [PATCH 0/7] virtio: avoid inappropriate QEMU termination, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH 2/7] virtio-blk: handle virtio_blk_handle_request() errors, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH 3/7] virtio-net: handle virtio_net_handle_ctrl() error,
Greg Kurz <=
- [Qemu-devel] [PATCH 4/7] virtio-net: handle virtio_net_receive() errors, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH 5/7] virtio-net: handle virtio_net_flush_tx() errors, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH 6/7] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error(), Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH 7/7] virtio-scsi: handle virtio_scsi_set_config() error, Greg Kurz, 2016/09/21
- Re: [Qemu-devel] [PATCH 0/7] virtio: avoid inappropriate QEMU termination, no-reply, 2016/09/21