diff options
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 5c5136fceea8..a1202841aadd 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -239,13 +239,15 @@ struct pernet_operations { | |||
239 | * needs per network namespace operations use device pernet operations, | 239 | * needs per network namespace operations use device pernet operations, |
240 | * otherwise use pernet subsys operations. | 240 | * otherwise use pernet subsys operations. |
241 | * | 241 | * |
242 | * This is critically important. Most of the network code cleanup | 242 | * Network interfaces need to be removed from a dying netns _before_ |
243 | * runs with the assumption that dev_remove_pack has been called so no | 243 | * subsys notifiers can be called, as most of the network code cleanup |
244 | * new packets will arrive during and after the cleanup functions have | 244 | * (which is done from subsys notifiers) runs with the assumption that |
245 | * been called. dev_remove_pack is not per namespace so instead the | 245 | * dev_remove_pack has been called so no new packets will arrive during |
246 | * guarantee of no more packets arriving in a network namespace is | 246 | * and after the cleanup functions have been called. dev_remove_pack |
247 | * provided by ensuring that all network devices and all sockets have | 247 | * is not per namespace so instead the guarantee of no more packets |
248 | * left the network namespace before the cleanup methods are called. | 248 | * arriving in a network namespace is provided by ensuring that all |
249 | * network devices and all sockets have left the network namespace | ||
250 | * before the cleanup methods are called. | ||
249 | * | 251 | * |
250 | * For the longest time the ipv4 icmp code was registered as a pernet | 252 | * For the longest time the ipv4 icmp code was registered as a pernet |
251 | * device which caused kernel oops, and panics during network | 253 | * device which caused kernel oops, and panics during network |