summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorMartin KaFai Lau2015-09-15 23:30:07 +0200
committerDavid S. Miller2015-09-15 23:53:05 +0200
commitcdf3464e6c6bd764277cbbe992cd12da735b92fb (patch)
tree53e75a7f94aba7ced57ae7f2b527bce0d463a629 /ipc
parentipv6: Rename the dst_cache helper functions in ip6_tunnel (diff)
downloadkernel-qcow2-linux-cdf3464e6c6bd764277cbbe992cd12da735b92fb.tar.gz
kernel-qcow2-linux-cdf3464e6c6bd764277cbbe992cd12da735b92fb.tar.xz
kernel-qcow2-linux-cdf3464e6c6bd764277cbbe992cd12da735b92fb.zip
ipv6: Fix dst_entry refcnt bugs in ip6_tunnel
Problems in the current dst_entry cache in the ip6_tunnel: 1. ip6_tnl_dst_set is racy. There is no lock to protect it: - One major problem is that the dst refcnt gets messed up. F.e. the same dst_cache can be released multiple times and then triggering the infamous dst refcnt < 0 warning message. - Another issue is the inconsistency between dst_cache and dst_cookie. It can be reproduced by adding and removing the ip6gre tunnel while running a super_netperf TCP_CRR test. 2. ip6_tnl_dst_get does not take the dst refcnt before returning the dst. This patch: 1. Create a percpu dst_entry cache in ip6_tnl 2. Use a spinlock to protect the dst_cache operations 3. ip6_tnl_dst_get always takes the dst refcnt before returning Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions