pppol2tp: calls unregister_pernet_gen_device() at unload time
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 28 Jul 2009 03:47:39 +0000 (03:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Aug 2009 19:20:34 +0000 (12:20 -0700)
Failure to call unregister_pernet_gen_device() can exhaust memory
if module is loaded/unloaded many times.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pppol2tp.c

index e7935d09c896786083606cc23d962a6504aed9a5..e0f9219a0aea8b60927d3ec0ef6861d8b1880261 100644 (file)
@@ -2680,6 +2680,7 @@ out_unregister_pppol2tp_proto:
 static void __exit pppol2tp_exit(void)
 {
        unregister_pppox_proto(PX_PROTO_OL2TP);
+       unregister_pernet_gen_device(pppol2tp_net_id, &pppol2tp_net_ops);
        proto_unregister(&pppol2tp_sk_proto);
 }