Re: [PATCH net-next 02/21] udp: call dst_hold_safe() in udp_sk_rx_set_dst()

2017-06-16 Thread Wei Wang
On Fri, Jun 16, 2017 at 12:02 PM, David Miller wrote: > From: Wei Wang > Date: Fri, 16 Jun 2017 10:47:25 -0700 > >> + if (dst) >> + /* set noref for now. >> + * any place which wants to hold dst has to call >> + * dst_hold_safe() >> + */ >> +

Re: [PATCH net-next 02/21] udp: call dst_hold_safe() in udp_sk_rx_set_dst()

2017-06-16 Thread David Miller
From: Wei Wang Date: Fri, 16 Jun 2017 10:47:25 -0700 > + if (dst) > + /* set noref for now. > + * any place which wants to hold dst has to call > + * dst_hold_safe() > + */ > + skb_dst_set_noref(skb, dst); You must enclose the co

[PATCH net-next 02/21] udp: call dst_hold_safe() in udp_sk_rx_set_dst()

2017-06-16 Thread Wei Wang
From: Wei Wang In udp_v4/6_early_demux() code, we try to hold dst->__refcnt for dst with DST_NOCACHE flag. This is because later in udp_sk_rx_dst_set() function, we will try to cache this dst in sk for connected case. However, a better way to achieve this is to not try to hold dst in early_demux(