aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tunnel4.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-09 01:33:43 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-09 18:02:39 -0400
commit49d61e2390c92bd226fc395a6165eb5a65ae4de6 (patch)
treed5c6e07e51999aca2a461c7087b7a01461c66ba8 /net/ipv4/tunnel4.c
parentf39234d60617d37818b30991e6794643ce220296 (diff)
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 'net/ipv4/tunnel4.c')
-rw-r--r--net/ipv4/tunnel4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tunnel4.c b/net/ipv4/tunnel4.c
index df59d16337f2..9a17bd2a0a37 100644
--- a/net/ipv4/tunnel4.c
+++ b/net/ipv4/tunnel4.c
@@ -39,7 +39,7 @@ int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family)
39 } 39 }
40 40
41 handler->next = *pprev; 41 handler->next = *pprev;
42 *pprev = handler; 42 rcu_assign_pointer(*pprev, handler);
43 43
44 ret = 0; 44 ret = 0;
45 45