summaryrefslogtreecommitdiffstats
path: root/net/ipv6/tunnel6.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-09 07:33:43 +0200
committerDavid S. Miller <davem@davemloft.net>2010-09-10 00:02:39 +0200
commit49d61e2390c92bd226fc395a6165eb5a65ae4de6 (patch)
treed5c6e07e51999aca2a461c7087b7a01461c66ba8 /net/ipv6/tunnel6.c
parentnet/core: add lock context change annotations in net/core/sock.c (diff)
downloadlinux-49d61e2390c92bd226fc395a6165eb5a65ae4de6.tar.xz
linux-49d61e2390c92bd226fc395a6165eb5a65ae4de6.zip
tunnels: missing rcu_assign_pointer()
xfrm4_tunnel_register() & xfrm6_tunnel_register() should use rcu_assign_pointer() to make sure previous writes (to handler->next) are committed to memory before chain insertion. deregister functions dont need a particular barrier. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv6/tunnel6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c
index 3177fe0459e0..d9864725d0c6 100644
--- a/net/ipv6/tunnel6.c
+++ b/net/ipv6/tunnel6.c
@@ -51,7 +51,7 @@ int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family)
}
handler->next = *pprev;
- *pprev = handler;
+ rcu_assign_pointer(*pprev, handler);
ret = 0;