Skip to content

Commit

Permalink
vxlan: fix out of order operation on module removal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger committed Jun 24, 2013
1 parent 3717348 commit b715398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,8 +1771,8 @@ late_initcall(vxlan_init_module);

static void __exit vxlan_cleanup_module(void)
{
rtnl_link_unregister(&vxlan_link_ops);
unregister_pernet_device(&vxlan_net_ops);
rtnl_link_unregister(&vxlan_link_ops);
rcu_barrier();
}
module_exit(vxlan_cleanup_module);
Expand Down

0 comments on commit b715398

Please sign in to comment.