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: 8017c27919 ("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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
f9aada5fff
commit
cfa0ebc9d6
@@ -2743,9 +2743,9 @@ module_init(virtio_net_driver_init);
|
|||||||
|
|
||||||
static __exit void virtio_net_driver_exit(void)
|
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(CPUHP_VIRT_NET_DEAD);
|
||||||
cpuhp_remove_multi_state(virtionet_online);
|
cpuhp_remove_multi_state(virtionet_online);
|
||||||
unregister_virtio_driver(&virtio_net_driver);
|
|
||||||
}
|
}
|
||||||
module_exit(virtio_net_driver_exit);
|
module_exit(virtio_net_driver_exit);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user