mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
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>
This commit is contained in:
parent
788954270d
commit
43849424cf
1 changed files with 1 additions and 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue