aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_metrics.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-08-14 14:31:07 +0000
committerArnd Bergmann <arnd@arndb.de>2012-08-14 14:31:07 +0000
commite13b8ae7949106c6a8b1d4f2eb0dbde81b6cd32e (patch)
tree01588d5eee318133d93d04aa5c0718fca26309a4 /net/ipv4/tcp_metrics.c
parent38a398422b7225aa6a35892843d411d05140cbb4 (diff)
parente25dc79e919fb7cae5e2e26c5494d2d90c857965 (diff)
Merge branch 'testing/defconfig-warnings' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into testing/multiplatform3tracking-multiplatform-llct-20120814.0
Conflicts: arch/arm/mach-pxa/cm-x2xx.c sound/soc/ux500/ux500_msp_dai.c sound/soc/ux500/ux500_msp_i2s.c sound/soc/ux500/ux500_msp_i2s.h
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r--net/ipv4/tcp_metrics.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 2288a6399e1..0abe67bb4d3 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -731,6 +731,18 @@ static int __net_init tcp_net_metrics_init(struct net *net)
static void __net_exit tcp_net_metrics_exit(struct net *net)
{
+ unsigned int i;
+
+ for (i = 0; i < (1U << net->ipv4.tcp_metrics_hash_log) ; i++) {
+ struct tcp_metrics_block *tm, *next;
+
+ tm = rcu_dereference_protected(net->ipv4.tcp_metrics_hash[i].chain, 1);
+ while (tm) {
+ next = rcu_dereference_protected(tm->tcpm_next, 1);
+ kfree(tm);
+ tm = next;
+ }
+ }
kfree(net->ipv4.tcp_metrics_hash);
}