提交 43849424 编写于 作者: M Michael S. Tsirkin 提交者: Anthony Liguori

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: NMichael S. Tsirkin <mst@redhat.com>
上级 78895427
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册