From: Eric Dumazet Date: Thu, 16 Sep 2010 12:27:50 +0000 (+0000) Subject: xfrm: dont assume rcu_read_lock in xfrm_output_one() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e71895a1beff2014534c9660d9ae42e043f11555;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git xfrm: dont assume rcu_read_lock in xfrm_output_one() 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 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index a3cca0a9434..64f2ae1fdc1 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -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));