From: Pierre Morel <pmorel@linux.vnet.ibm.com>
To: virtualization@lists.linux-foundation.org
Cc: mst@redhat.com
Subject: [PATCH] net/virtio-net: reverse unregistering on exit
Date: Tue, 22 Aug 2017 16:59:52 +0200 [thread overview]
Message-ID: <1503413992-29558-2-git-send-email-pmorel@linux.vnet.ibm.com> (raw)
In-Reply-To: <1503413992-29558-1-git-send-email-pmorel@linux.vnet.ibm.com>
unregister_virtio_driver should be done before the unregistering of
the hotplug state machine callbacks, otherwise the state machine still
holds some instance states at that time.
Let's first unregister the virtio_net_driver first and then the hotplug
state machine callbacks.
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 143d8a9..c042ffd 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2734,9 +2734,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);
--
2.7.4
next prev parent reply other threads:[~2017-08-22 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 14:59 [PATCH] net/virtio-net: reverse unregistering on exit Pierre Morel
2017-08-22 14:59 ` Pierre Morel [this message]
2017-08-22 18:13 ` Michael S. Tsirkin
2017-08-23 8:28 ` Pierre Morel
2017-08-22 18:17 ` Michael S. Tsirkin
2017-08-23 8:46 ` Pierre Morel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503413992-29558-2-git-send-email-pmorel@linux.vnet.ibm.com \
--to=pmorel@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox