tap: clear vhost_net backend on cleanup
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 27 Oct 2010 18:03:43 +0000 (20:03 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Nov 2010 13:10:03 +0000 (15:10 +0200)
commit746be8c92121fc7944528666bc0cb57157f47bde
treefe57c8065c292b73e7dcd9008423d515fb973cbf
parenteeb3e9787c29ebdbe13cd5ee07015688b6f0bda4
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>
net/tap.c