summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_tunnel.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2015-09-15 23:30:09 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-15 23:53:05 +0200
commit70da5b5c532f0ec8aa76b4f46158da5f010f34b3 (patch)
tree11b8e0054461b9788d669215416655f112545670 /include/net/ip6_tunnel.h
parentipv6: Avoid double dst_free (diff)
downloadlinux-70da5b5c532f0ec8aa76b4f46158da5f010f34b3.tar.xz
linux-70da5b5c532f0ec8aa76b4f46158da5f010f34b3.zip
ipv6: Replace spinlock with seqlock and rcu in ip6_tunnel
This patch uses a seqlock to ensure consistency between idst->dst and idst->cookie. It also makes dst freeing from fib tree to undergo a rcu grace period. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_tunnel.h')
-rw-r--r--include/net/ip6_tunnel.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index 60b4f402f78c..65c2a9397b3c 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -33,8 +33,8 @@ struct __ip6_tnl_parm {
};
struct ip6_tnl_dst {
- spinlock_t lock;
- struct dst_entry *dst;
+ seqlock_t lock;
+ struct dst_entry __rcu *dst;
u32 cookie;
};