virtio-net: handle virtio_net_handle_ctrl() error
commitba7eadb5927633d487064b518bf6fd001369e30c
authorGreg Kurz <groug@kaod.org>
Fri, 30 Sep 2016 15:13:16 +0000 (30 17:13 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 9 Oct 2016 22:16:59 +0000 (10 01:16 +0300)
tree4ca6d875268fa9e5b002edb759e2e34b36321faa
parent20ea686a0cacdec1bde9a39e74afd38bf672424d
virtio-net: handle virtio_net_handle_ctrl() error

This error is caused by a buggy guest: let's switch the device to the
broken state instead of terminating QEMU. Also we detach the element
from the virtqueue and free it.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c