geneve: Unregister pernet subsys on module unload.
authorJesse Gross <jesse@nicira.com>
Tue, 4 Nov 2014 03:38:38 +0000 (19:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Nov 2014 20:00:51 +0000 (15:00 -0500)
The pernet ops aren't ever unregistered, which causes a memory
leak and an OOPs if the module is ever reinserted.

Fixes: 0b5e8b8eeae4 ("net: Add Geneve tunneling protocol driver")
CC: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/geneve.c

index 6e5266cf403dae00a99f4a83e145563390928ddc..dedb21e9991438259ff66a4e4817349dfd9d3224 100644 (file)
@@ -366,6 +366,7 @@ late_initcall(geneve_init_module);
 static void __exit geneve_cleanup_module(void)
 {
        destroy_workqueue(geneve_wq);
+       unregister_pernet_subsys(&geneve_net_ops);
 }
 module_exit(geneve_cleanup_module);