[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH 1/2] virtio-net: drop assert on vm
From: |
Jason Wang |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH 1/2] virtio-net: drop assert on vm stop |
Date: |
Fri, 12 Sep 2014 11:12:15 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
On 09/12/2014 12:18 AM, Michael S. Tsirkin wrote:
> On vm stop, vm_running state set to stopped
> before device is notified, so callbacks can get envoked with
> vm_running = false; and this is not an error.
This is consistent with virtio-blk which also has such kinds of
callbacks. This fixes the issue of qemu crashing when stop during
transmission.
Acked-by: Jason Wang <address@hidden>
> Cc: address@hidden
> Cc: Jason Wang <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
> hw/net/virtio-net.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 826a2a5..2040eac 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -1125,8 +1125,6 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q)
> return num_packets;
> }
>
> - assert(vdev->vm_running);
> -
> if (q->async_tx.elem.out_num) {
> virtio_queue_set_notification(q->tx_vq, 0);
> return num_packets;