mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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 <[email protected]>
Signed-off-by: Andrew Jones <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
This commit is contained in:
1 parent
f9aada5fff
commit
cfa0ebc9d6
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user