Thread (83 messages) flat view 83 messages, 9 authors, 2017-11-14
STALE3204d

[PATCH v5 03/13] packet: exit_net cleanup check added

From: Vasily Averin <hidden>
Date: 2017-11-12 19:27:51
Subsystem: networking [general], packet sockets, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Linus Torvalds

Be sure that packet.sklist initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <redacted>
---
 net/packet/af_packet.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index bec01a3..4b58c4a 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -4562,6 +4562,7 @@ static int __net_init packet_net_init(struct net *net)
 static void __net_exit packet_net_exit(struct net *net)
 {
 	remove_proc_entry("packet", net->proc_net);
+	WARN_ON_ONCE(!hlist_empty(&net->packet.sklist));
 }
 
 static struct pernet_operations packet_net_ops = {
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help