diff options
author | Andrew Jones <drjones@redhat.com> | 2017-07-24 16:38:32 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-07-25 16:37:36 +0300 |
commit | cfa0ebc9d6d6308564f5174ecb655b9d504b2be5 (patch) | |
tree | 910ffe5323fd35fa7f58b24ec19fff5ea888a651 /drivers/net/virtio_net.c | |
parent | f9aada5fff212913372410ae45c18c7c3cade67a (diff) | |
download | linux-cfa0ebc9d6d6308564f5174ecb655b9d504b2be5.tar.xz |
virtio-net: fix module unloading
Unregister the driver before removing multi-instance hotplug
callbacks. This order avoids the warning issued from
__cpuhp_remove_state_cpuslocked when the number of remaining
instances isn't yet zero.
Fixes: 8017c279196a ("net/virtio-net: Convert to hotplug state machine")
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 99a26a9efec1..f41ab0ea942a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2743,9 +2743,9 @@ module_init(virtio_net_driver_init); static __exit void virtio_net_driver_exit(void) { + unregister_virtio_driver(&virtio_net_driver); cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); cpuhp_remove_multi_state(virtionet_online); - unregister_virtio_driver(&virtio_net_driver); } module_exit(virtio_net_driver_exit); |