diff options
| author | Olof Johansson <olof@lixom.net> | 2012-09-05 15:35:48 -0700 | 
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2012-09-05 15:35:48 -0700 | 
| commit | 1875962377574b4edb7b164001e3e341c25290d5 (patch) | |
| tree | 374a5299403ec21e2d9a66a6548ce876a388b589 /net/ipv4/tcp_metrics.c | |
| parent | 5cbee140a28c2746449ae31e85738043ae4da927 (diff) | |
| parent | c88a79a7789b2909ad1cf69ea2c9142030bbd6f4 (diff) | |
| download | olio-linux-3.10-1875962377574b4edb7b164001e3e341c25290d5.tar.xz olio-linux-3.10-1875962377574b4edb7b164001e3e341c25290d5.zip  | |
Merge branch 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt
* 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: mach-shmobile: Add compilation support for dtbs using 'make dtbs'
  + sync to 3.6-rc3
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
| -rw-r--r-- | net/ipv4/tcp_metrics.c | 12 | 
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);  }  |