Message ID | CAHA+R7PAyR_cJ9_9nfUBc0U9o-U=gCV+sN_VYbHwgq-QdoEVzQ@mail.gmail.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index d3929a6..eb50b9a 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -77,10 +77,11 @@ static inline void __tunnel_dst_set(struct ip_tunnel_dst *idst, dst = NULL; spin_lock_bh(&idst->lock); - old_dst = rcu_dereference(idst->dst); + old_dst = idst->dst; rcu_assign_pointer(idst->dst, dst); - dst_release(old_dst); spin_unlock_bh(&idst->lock); + synchronize_rcu(); + dst_release(old_dst); }