Skip to contentSkip to conversation

packet: exit_net cleanup check added

PATCH Superseded Vasily Averin 1 participant 1 message Nov 5, 2017

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 19/21 packet: exit_net cleanup check added

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

---
 net/packet/af_packet.c | 2 ++
 1 file changed, 2 insertions(+)
net/packet/af_packet.c +2 -0
index bec01a3..16bbc0e 100644
@@ -4562,6 +4562,8 @@ 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(!hlist_empty(&net->packet.sklist),
+	     "net %p exit: packet sklist is not empty\n", net);
 }
 
 static struct pernet_operations packet_net_ops = {
Signature · 1 line
2.7.4