diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-10-27 20:03:43 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-11-16 08:40:07 -0600 |
commit | 43849424cff82803011fad21074531a1101e514e (patch) | |
tree | 4229dabaade45f130fdb0c2022347ed4af16fd16 /net | |
parent | 788954270d339b4b271e1a537a481e7068ba3591 (diff) | |
download | qemu-43849424cff82803011fad21074531a1101e514e.zip qemu-43849424cff82803011fad21074531a1101e514e.tar.gz qemu-43849424cff82803011fad21074531a1101e514e.tar.bz2 |
tap: clear vhost_net backend on cleanup
Frontends calling tap_get_vhost_net get an invalid pointer after the
peer backend has been deleted. Jason Wang <jasowang@redhat.com> reports
this leading to a crash in ack_features when we remove the vhost-net
bakend of a virtio nic.
The fix is simply to clear the backend pointer.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/tap.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -279,6 +279,7 @@ static void tap_cleanup(VLANClientState *nc) if (s->vhost_net) { vhost_net_cleanup(s->vhost_net); + s->vhost_net = NULL; } qemu_purge_queued_packets(nc); |