xfrm: dont assume rcu_read_lock in xfrm_output_one()
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 16 Sep 2010 12:27:50 +0000 (12:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Sep 2010 04:46:15 +0000 (21:46 -0700)
ip_local_out() is called with rcu_read_lock() held from ip_queue_xmit()
but not from other call sites.

Reported-and-bisected-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_output.c

index a3cca0a94346319dec462ef7ef2fb7df2265945e..64f2ae1fdc15e2a63a28fc7073fc0e1f957cee44 100644 (file)
@@ -101,7 +101,7 @@ resume:
                        err = -EHOSTUNREACH;
                        goto error_nolock;
                }
-               skb_dst_set_noref(skb, dst);
+               skb_dst_set(skb, dst_clone(dst));
                x = dst->xfrm;
        } while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL));