ip_gre: fix fallback tunnel setup
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 30 Oct 2010 23:21:28 +0000 (16:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Oct 2010 23:21:28 +0000 (16:21 -0700)
commit3285ee3bb2e158299ff19b947e41da735980d954
tree8235c80ec137fd080e23bdeab8eefa0d9d5c395f
parent1b803fbfcd1c35857fe52844158213507a8a5bfa
ip_gre: fix fallback tunnel setup

Before making the fallback tunnel visible to lookups, we should make
sure it is completely setup, once ipgre_tunnel_init() had been called
and tstats per_cpu pointer allocated.

move rcu_assign_pointer(ign->tunnels_wc[0], tunnel); from
ipgre_fb_tunnel_init() to ipgre_init_net()

Based on a patch from Pavel Emelyanov

Reported-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c