]> git.hungrycats.org Git - linux/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 17:45:14 +0000 (10:45 -0700)
[ Upstream commit 446e72f30eca76d6f9a1a54adf84d2c6ba2831f8 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/pppol2tp.c

index 5b07dd8e5c04e6b274e303b837c8243b31ba47dc..72be141d792f3bdea22044edcac07836a780d637 100644 (file)
@@ -2682,6 +2682,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);
 }