All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH net v2 03/03] [PATCH] vxlan: fix crash on module removal
Date: Mon, 10 Jun 2013 13:13:15 -0700	[thread overview]
Message-ID: <20130610131315.384c5b61@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20130610195822.888424947@vyatta.com>

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>
---
Should goto stable

--- a/drivers/net/vxlan.c	2013-06-06 08:29:07.910429205 -0700
+++ b/drivers/net/vxlan.c	2013-06-06 09:38:52.091675246 -0700
@@ -1785,8 +1785,9 @@ 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);
+	destroy_workqueue(vxlan_wq);
 	rcu_barrier();
 }
 module_exit(vxlan_cleanup_module);

  parent reply	other threads:[~2013-06-10 20:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130610195822.888424947@vyatta.com>
2013-06-10 20:12 ` [PATCH net v2 02/03] vxlan: handle skb_clone failure Stephen Hemminger
2013-06-10 21:01   ` David Miller
2013-06-10 20:13 ` Stephen Hemminger [this message]
2013-06-10 21:01   ` [PATCH net v2 03/03] [PATCH] vxlan: fix crash on module removal David Miller
2013-06-10 21:14     ` David Miller
2013-06-10 21:18       ` David Miller
2013-06-10 21:48         ` Stephen Hemminger
2013-06-11  4:10           ` David Miller
2013-06-10 20:13 ` [PATCH net v2 01/03] vxlan: only migrate dynamic FDB entries Stephen Hemminger
2013-06-10 20:27   ` Sergei Shtylyov
2013-06-10 20:32     ` Stephen Hemminger
2013-06-10 20:42       ` David Miller
2013-06-10 21:00   ` 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=20130610131315.384c5b61@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.