Skip to content

Commit 6501810

Browse files
Juan Quintelajasowang
authored andcommitted
virtio-net: fix removal of failover device
If you have a networking device and its virtio failover device, and you remove them in this order: - virtio device - the real device You get qemu crash. See bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1820120 Bug exist on qemu 4.2 and 5.0. But in 5.0 don't shows because commit 77b06bb somehow papers over it. CC: Jason Wang <[email protected]> CC: Michael S. Tsirkin <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Acked-by: Laurent Vivier <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Signed-off-by: Jason Wang <[email protected]>
1 parent 6732053 commit 6501810

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hw/net/virtio-net.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,6 +3416,7 @@ static void virtio_net_device_unrealize(DeviceState *dev)
34163416
g_free(n->vlans);
34173417

34183418
if (n->failover) {
3419+
device_listener_unregister(&n->primary_listener);
34193420
g_free(n->primary_device_id);
34203421
g_free(n->standby_id);
34213422
qobject_unref(n->primary_device_dict);

0 commit comments

Comments
 (0)