linux_dsm_epyc7002/net/ipv4
Eric Dumazet f886497212 ipv4: fix dst race in sk_dst_get()
When IP route cache had been removed in linux-3.6, we broke assumption
that dst entries were all freed after rcu grace period. DST_NOCACHE
dst were supposed to be freed from dst_release(). But it appears
we want to keep such dst around, either in UDP sockets or tunnels.

In sk_dst_get() we need to make sure dst refcount is not 0
before incrementing it, or else we might end up freeing a dst
twice.

DST_NOCACHE set on a dst does not mean this dst can not be attached
to a socket or a tunnel.

Then, before actual freeing, we need to observe a rcu grace period
to make sure all other cpus can catch the fact the dst is no longer
usable.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dormando <dormando@rydia.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-25 17:41:44 -07:00
..
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2014-05-30 17:54:47 -07:00
af_inet.c gre: Call gso_make_checksum 2014-06-04 22:46:38 -07:00
ah4.c
arp.c
cipso_ipv4.c
datagram.c ipv4: fix a race in ip4_datagram_release_cb() 2014-06-11 15:39:18 -07:00
devinet.c
esp4.c
fib_frontend.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c net: Revert "fib_trie: use seq_file_net rather than seq->private" 2014-06-04 15:11:41 -07:00
gre_demux.c gre: Call gso_make_checksum 2014-06-04 22:46:38 -07:00
gre_offload.c net: Save software checksum complete 2014-06-11 15:46:13 -07:00
icmp.c
igmp.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
inet_connection_sock.c
inet_diag.c
inet_fragment.c
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
ip_forward.c
ip_fragment.c
ip_gre.c gre: allow changing mac address when device is up 2014-06-10 22:46:42 -07:00
ip_input.c
ip_options.c
ip_output.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
ip_sockglue.c
ip_tunnel_core.c net: Support for multiple checksums with gso 2014-06-04 22:46:38 -07:00
ip_tunnel.c ipv4: fix dst race in sk_dst_get() 2014-06-25 17:41:44 -07:00
ip_vti.c ip_vti: Fix 'ip tunnel add' with 'key' parameters 2014-06-11 00:30:52 -07:00
ipcomp.c
ipconfig.c
ipip.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-11 16:02:55 -07:00
ipmr.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
Kconfig
Makefile
netfilter.c
ping.c
proc.c
protocol.c
raw.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
route.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
syncookies.c
sysctl_net_ipv4.c
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_fastopen.c tcp: remove unnecessary tcp_sk assignment. 2014-06-16 21:35:00 -07:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: fix tcp_match_skb_to_sack() for unaligned SACK at end of an skb 2014-06-19 20:50:49 -07:00
tcp_ipv4.c
tcp_lp.c
tcp_memcontrol.c
tcp_metrics.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
tcp_minisocks.c
tcp_offload.c gre: Call gso_make_checksum 2014-06-04 22:46:38 -07:00
tcp_output.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c
tunnel4.c
udp_diag.c
udp_impl.h
udp_offload.c net: Add skb_gro_postpull_rcsum to udp and vxlan 2014-06-11 15:46:13 -07:00
udp.c udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup 2014-06-13 15:39:24 -07:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c