Message ID | 0054031415584f58aeba627a5ca5aefc@svr-chch-ex1.atlnz.lc |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
Hey Gregory,
On Sun, Aug 2, 2015 at 2:28 PM, Gregory Hoggarth
<Gregory.Hoggarth@alliedtelesis.co.nz> wrote:
> I will apply the new suggested patch, reverting previous patch, and test overnight and update tomorrow.
Did this solve your problem? If not, would you mind sharing a repro?
On Wed, 2015-08-12 at 09:13 -0700, Alex Gartrell wrote: > Hey Gregory, > > On Sun, Aug 2, 2015 at 2:28 PM, Gregory Hoggarth > <Gregory.Hoggarth@alliedtelesis.co.nz> wrote: > > I will apply the new suggested patch, reverting previous patch, and test overnight and update tomorrow. > > Did this solve your problem? If not, would you mind sharing a repro? > https://www.mail-archive.com/netdev@vger.kernel.org/msg72736.html -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 83aa604f9273..1b8c5ba7d5f7 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1995,12 +1995,19 @@ void udp_v4_early_demux(struct sk_buff *skb) skb->sk = sk; skb->destructor = sock_efree; - dst = sk->sk_rx_dst; + dst = READ_ONCE(sk->sk_rx_dst); if (dst) dst = dst_check(dst, 0); - if (dst) - skb_dst_set_noref(skb, dst); + if (dst) { + /* DST_NOCACHE can not be used without taking a reference */ + if (dst->flags & DST_NOCACHE) { + if (likely(atomic_inc_not_zero(&dst->__refcnt))) + skb_dst_set(skb, dst); + } else { + skb_dst_set_noref(skb, dst); + } + } } int udp_rcv(struct sk_buff *skb)