All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net] vxlan: fix crash on module removal
Date: Wed, 5 Jun 2013 08:37:00 -0700	[thread overview]
Message-ID: <20130605083700.2a09e379@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1370406254-6341-3-git-send-email-stephen@networkplumber.org>

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>
---
See "vxlan: move IGMP join/leave to work queue" for the net-next
version of this

 drivers/net/vxlan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 3b1d2ee..5cc3b48 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1677,8 +1677,8 @@ module_init(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);
-- 
1.7.10.4

  parent reply	other threads:[~2013-06-05 15:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05  4:24 [PATCH net-next 01/10] vxlan: only migrate dynamic FDB entries Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 02/10] vxlan: handle skb_clone failure Stephen Hemminger
2013-06-05  6:59   ` Cong Wang
2013-06-05 14:05     ` David Stevens
2013-06-06  0:47       ` Cong Wang
2013-06-06  1:31         ` Stephen Hemminger
2013-06-05 12:50   ` David Stevens
2013-06-05  4:24 ` [PATCH net-next 03/10] vxlan: move IGMP join/leave to work queue Stephen Hemminger
2013-06-05  6:47   ` Cong Wang
2013-06-05  7:29     ` Mike Rapoport
2013-06-05  8:00       ` Cong Wang
2013-06-05 15:41       ` Stephen Hemminger
2013-06-08  8:23         ` Mike Rapoport
2013-06-05 15:42     ` Stephen Hemminger
2013-06-06  0:49       ` Cong Wang
2013-06-05 15:37   ` Stephen Hemminger [this message]
2013-06-06  1:11     ` [PATCH net] vxlan: fix crash on module removal Cong Wang
2013-06-06  1:32       ` Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 04/10] vxlan: send notification when MAC migrates Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 05/10] vxlan: make vxlan_xmit_one void Stephen Hemminger
2013-06-05 12:54   ` David Stevens
2013-06-05  4:24 ` [PATCH net-next 06/10] vxlan: convert remotes list to list_rcu Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 07/10] vxlan: port module param should be ushort Stephen Hemminger
2013-06-05 13:35   ` Sergei Shtylyov
2013-06-05  4:24 ` [PATCH net-next 08/10] vxlan: use initializer for dummy structures Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 09/10] vxlan: whitespace cleanup Stephen Hemminger
2013-06-05 12:55   ` David Stevens
2013-06-05  4:24 ` [PATCH net-next 10/10] vxlan: version 0.2 Stephen Hemminger
2013-06-05  6:23 ` [PATCH net-next 01/10] vxlan: only migrate dynamic FDB entries Cong Wang
2013-06-06 23:16 ` David Miller

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=20130605083700.2a09e379@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.