* [PATCH] net: explain netns notifiers a little better
@ 2009-07-15 16:16 Johannes Berg
2009-07-20 15:04 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-07-15 16:16 UTC (permalink / raw)
To: netdev; +Cc: Eric W. Biederman
Eric explained this to me -- and afterwards the comment
made sense, but not before. Add the the critical point
about interfaces having to be gone from the netns before
subsys notifiers are called.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/net_namespace.h | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
--- wireless-testing.orig/include/net/net_namespace.h 2009-07-11 11:18:20.000000000 +0200
+++ wireless-testing/include/net/net_namespace.h 2009-07-11 11:20:49.000000000 +0200
@@ -239,13 +239,15 @@ struct pernet_operations {
* needs per network namespace operations use device pernet operations,
* otherwise use pernet subsys operations.
*
- * This is critically important. Most of the network code cleanup
- * runs with the assumption that dev_remove_pack has been called so no
- * new packets will arrive during and after the cleanup functions have
- * been called. dev_remove_pack is not per namespace so instead the
- * guarantee of no more packets arriving in a network namespace is
- * provided by ensuring that all network devices and all sockets have
- * left the network namespace before the cleanup methods are called.
+ * Network interfaces need to be removed from a dying netns _before_
+ * subsys notifiers can be called, as most of the network code cleanup
+ * (which is done from subsys notifiers) runs with the assumption that
+ * dev_remove_pack has been called so no new packets will arrive during
+ * and after the cleanup functions have been called. dev_remove_pack
+ * is not per namespace so instead the guarantee of no more packets
+ * arriving in a network namespace is provided by ensuring that all
+ * network devices and all sockets have left the network namespace
+ * before the cleanup methods are called.
*
* For the longest time the ipv4 icmp code was registered as a pernet
* device which caused kernel oops, and panics during network
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: explain netns notifiers a little better
2009-07-15 16:16 [PATCH] net: explain netns notifiers a little better Johannes Berg
@ 2009-07-20 15:04 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-07-20 15:04 UTC (permalink / raw)
To: johannes; +Cc: netdev, ebiederm
From: Johannes Berg <johannes@sipsolutions.net>
Date: Wed, 15 Jul 2009 18:16:34 +0200
> Eric explained this to me -- and afterwards the comment
> made sense, but not before. Add the the critical point
> about interfaces having to be gone from the netns before
> subsys notifiers are called.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Applied to net-next-2.6
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-20 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 16:16 [PATCH] net: explain netns notifiers a little better Johannes Berg
2009-07-20 15:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).