diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2013-06-17 17:16:09 -0400 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2013-06-24 11:40:32 -0400 |
commit | b7153984074e51a50dad905871b705e0d67aa147 (patch) | |
tree | cfcc9cb5b14102d08291595a0f8e25909bb80c5f /drivers/net/vxlan.c | |
parent | 37173488400704f1a05656616cd12baa9e03173b (diff) |
vxlan: fix out of order operation on module removal
If vxlan is removed with active vxlan's it would crash because
rtnl_link_unregister (which calls vxlan_dellink), was invoked
before unregister_pernet_device (which calls vxlan_stop).
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 284c6c00c353..d3005d3a768d 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -1771,8 +1771,8 @@ late_initcall(vxlan_init_module); | |||
1771 | 1771 | ||
1772 | static void __exit vxlan_cleanup_module(void) | 1772 | static void __exit vxlan_cleanup_module(void) |
1773 | { | 1773 | { |
1774 | rtnl_link_unregister(&vxlan_link_ops); | ||
1775 | unregister_pernet_device(&vxlan_net_ops); | 1774 | unregister_pernet_device(&vxlan_net_ops); |
1775 | rtnl_link_unregister(&vxlan_link_ops); | ||
1776 | rcu_barrier(); | 1776 | rcu_barrier(); |
1777 | } | 1777 | } |
1778 | module_exit(vxlan_cleanup_module); | 1778 | module_exit(vxlan_cleanup_module); |