diff options
author | 2017-06-17 10:42:25 -0700 | |
---|---|---|
committer | 2017-06-17 22:53:59 -0400 | |
commit | d24406c85d123df773bc4df88ad5da2233896919 (patch) | |
tree | 745345616e8577a837668e5191f51abf36ace0aa /net/core | |
parent | ipv6: remove unnecessary dst_hold() in ip6_fragment() (diff) | |
download | linux-dev-d24406c85d123df773bc4df88ad5da2233896919.tar.xz linux-dev-d24406c85d123df773bc4df88ad5da2233896919.zip |
udp: call dst_hold_safe() in udp_sk_rx_set_dst()
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(), but in udp_sk_rx_dst_set(), call dst_hold_safe(). This
approach is also more consistant with how tcp is handling it. And it
will make later changes simpler.
Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions