diff mbox

[net,v2,03/03] vxlan: fix crash on module removal

Message ID 20130610131315.384c5b61@nehalam.linuxnetplumber.net
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Hemminger June 10, 2013, 8:13 p.m. UTC
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


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller June 10, 2013, 9:01 p.m. UTC | #1
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 10 Jun 2013 13:13:15 -0700

> 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

Applied and queued up for -stable.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller June 10, 2013, 9:14 p.m. UTC | #2
From: David Miller <davem@redhat.com>
Date: Mon, 10 Jun 2013 14:01:14 -0700 (PDT)

> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Mon, 10 Jun 2013 13:13:15 -0700
> 
>> 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
> 
> Applied and queued up for -stable.

Actually, this doesn't even compile.

+	destroy_workqueue(vxlan_wq);

vxlan_wq doesn't exist in the 'net' tree.

It doesn't exist in net-next either.

It gets added as part of your vxlan-next series which you posted at
the same time.

I'm tossing both vxlan patch sets, you'll need to resubmit them
properly.

I'm tossing both becuase I can tell the -next one won't apply properly
on top of this series up when you fix it up.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller June 10, 2013, 9:18 p.m. UTC | #3
From: David Miller <davem@davemloft.net>
Date: Mon, 10 Jun 2013 14:14:21 -0700 (PDT)

> Actually, this doesn't even compile.

One last thing, no compile testing means no functional testing was
done on these patches in the environment in which they were meant to
be applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Hemminger June 10, 2013, 9:48 p.m. UTC | #4
The issue was trying to split them into net and net-next series.
If I sent one series, would you be able to handle that?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller June 11, 2013, 4:10 a.m. UTC | #5
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 10 Jun 2013 14:48:14 -0700

> The issue was trying to split them into net and net-next series.
> If I sent one series, would you be able to handle that?

Everyone who wants to do this, does it like this:

1) You give me the "net" series with the bug fixes.

2) You give me the "net-next" series, and you tell me "this series
   depends upon the bug fixes going into 'net' from series X, please
   merge that into 'net-next' before applying this series.

And if you're really testing this stuff at all, that's how you're
developing and testing it too.  You put together the net patch set,
you _build_ it and you _test_ it.  Then you make a branch on
net-next, pull your 'net' stuff into it, and the build your 'net-next'
series on that branch.  Then you _build_ it and you _test_ it before
even thinking about posting it here.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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);