[PATCH] pppol2tp: calls unregister_pernet_gen_device() at unload time

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Tuesday, July 28, 2009 - 6:47 am

Eric Dumazet a écrit :

OK patch seems really easy...

This bug was added in commit 4e9fb8016a351b5b9da7fea32bcfdbc9d836e421
net: pppol2tp - introduce net-namespace functionality

So this is a stable candidate I guess ?

Thank you


[PATCH] pppol2tp: calls unregister_pernet_gen_device() at unload time

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>
---
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index e7935d0..e0f9219 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -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);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] net: net_assign_generic() fix , Eric Dumazet, (Tue Jul 28, 5:36 am)
Re: [PATCH] net: net_assign_generic() fix, Pavel Emelyanov, (Tue Jul 28, 6:03 am)
Re: [PATCH] net: net_assign_generic() fix, Eric Dumazet, (Tue Jul 28, 6:16 am)
Re: [PATCH] net: net_assign_generic() fix, Eric Dumazet, (Tue Jul 28, 6:22 am)
[PATCH] pppol2tp: calls unregister_pernet_gen_device() at ..., Eric Dumazet, (Tue Jul 28, 6:47 am)
[PATCH] pppoe: fix race at init time, Eric Dumazet, (Tue Jul 28, 10:46 am)
Re: [PATCH] pppoe: fix race at init time, Cyrill Gorcunov, (Tue Jul 28, 11:48 am)
Re: [PATCH] pppoe: fix race at init time, Igor M Podlesny, (Tue Jul 28, 8:55 pm)
Re: [PATCH] pppoe: fix race at init time, Eric Dumazet, (Tue Jul 28, 9:33 pm)
[PATCH] pppoe: fix /proc/net/pppoe, Eric Dumazet, (Wed Jul 29, 2:43 am)
Re: [PATCH] pppoe: fix race at init time, Cyrill Gorcunov, (Wed Jul 29, 7:46 am)
Re: [PATCH] pppoe: fix /proc/net/pppoe, David Miller, (Thu Jul 30, 2:19 pm)
Re: [PATCH] net: net_assign_generic() fix, David Miller, (Sun Aug 2, 12:27 pm)
Re: [PATCH] pppoe: fix race at init time, David Miller, (Wed Aug 12, 4:40 pm)
Re: [PATCH] pppoe: fix race at init time, Cyrill Gorcunov, (Fri Aug 14, 9:42 am)