Skip to contentSkip to conversation

conntrack: fix sysctl memory leak

PATCH Applied Stephen Hemminger 2 participants 2 messages Mar 10, 2011 – Mar 14, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 conntrack: fix sysctl memory leak

Message in log because sysctl table was not empty at netns exit

 WARNING: at net/sysctl_net.c:84 sysctl_net_exit+0x2a/0x2c()

Instrumenting showed that the nf_conntrack_timestamp was the entry that was being created but not cleared.

net/netfilter/nf_conntrack_core.c +1 -0
@@ -1301,6 +1301,7 @@ static void nf_conntrack_cleanup_net(str
 
 	nf_ct_free_hashtable(net->ct.hash, net->ct.htable_size);
 	nf_conntrack_ecache_fini(net);
+	nf_conntrack_tstamp_fini(net);
 	nf_conntrack_acct_fini(net);
 	nf_conntrack_expect_fini(net);
 	kmem_cache_destroy(net->ct.nf_conntrack_cachep);
#1 lore raw
Quoted 5 lines · Stephen Hemminger

Message in log because sysctl table was not empty at netns exit

 WARNING: at net/sysctl_net.c:84 sysctl_net_exit+0x2a/0x2c()

Instrumenting showed that the nf_conntrack_timestamp was the entry that was being created but not cleared.

Applied, thanks Stephen.