virtio-net: handle virtio_net_receive() errors
commitba10b9c0038e201d7ea28a9e3908928439ff7fa4
authorGreg Kurz <groug@kaod.org>
Fri, 30 Sep 2016 15:13:24 +0000 (30 17:13 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 9 Oct 2016 22:16:59 +0000 (10 01:16 +0300)
treecf73a1111e76d7c9459b674e44d6dc8c9f83e057
parentba7eadb5927633d487064b518bf6fd001369e30c
virtio-net: handle virtio_net_receive() errors

All these errors are 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: Cornelia Huck <cornelia.huck@de.ibm.com>
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