• J
    virtio-net: properly check the vhost status during status set · d7108d90
    Jason Wang 提交于
    Commit 32993698 (vhost: disable on tap link down) tries to disable the vhost
    also when the peer's link is down. But the check was not done properly, the
    vhost were only started when:
    
    1) peer's link is not down
    2) virtio-net has already been started.
    
    Since == have a higher precedence than &&, place a brace to make sure both the
    conditions were met then does the check. This fixes the crash when doing a savem
    after set the link off which let qemu crash and complains:
    
    virtio_net_save: Assertion `!n->vhost_started' failed.
    
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: NJason Wang <jasowang@redhat.com>
    Message-id: 1366972060-21606-1-git-send-email-jasowang@redhat.com
    Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
    d7108d90
virtio-net.c 41.8 KB