linux/net/ipv4
Eric Dumazet 94caec8ce7 ipv4: tcp: get rid of ugly unicast_sock
[ Upstream commit bdbbb8527b ]

In commit be9f4a44e7 ("ipv4: tcp: remove per net tcp_sock")
I tried to address contention on a socket lock, but the solution
I chose was horrible :

commit 3a7c384ffd ("ipv4: tcp: unicast_sock should not land outside
of TCP stack") addressed a selinux regression.

commit 0980e56e50 ("ipv4: tcp: set unicast_sock uc_ttl to -1")
took care of another regression.

commit b5ec8eeac4 ("ipv4: fix ip_send_skb()") fixed another regression.

commit 811230cd85 ("tcp: ipv4: initialize unicast_sock sk_pacing_rate")
was another shot in the dark.

Really, just use a proper socket per cpu, and remove the skb_orphan()
call, to re-enable flow control.

This solves a serious problem with FQ packet scheduler when used in
hostile environments, as we do not want to allocate a flow structure
for every RST packet sent in response to a spoofed packet.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 17:50:12 -08:00
..
netfilter netfilter: ipv4: defrag: set local_df flag on defragmented skb 2014-06-16 13:40:32 -07:00
Kconfig
Makefile gre_offload: statically build GRE offloading support 2014-01-06 20:28:34 -05:00
af_inet.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-28 08:06:01 -07:00
ah4.c
arp.c ipv4: arp: update neighbour address when a gratuitous arp is received and arp_accept is set 2014-01-02 00:08:38 -05:00
cipso_ipv4.c ipv4: ERROR: code indent should use tabs where possible 2013-12-26 13:43:21 -05:00
datagram.c ipv4: fix a race in ip4_datagram_release_cb() 2014-06-26 15:15:40 -04:00
devinet.c ipv4: Fix runtime WARNING in rtmsg_ifa() 2014-02-06 20:02:15 -08:00
esp4.c
fib_frontend.c fib_frontend: fix possible NULL pointer dereference 2014-01-24 15:51:26 -08:00
fib_lookup.h ipv4: make fib_detect_death static 2013-12-28 17:01:46 -05:00
fib_rules.c ipv4: Fix incorrect error code when adding an unreachable route 2014-12-06 15:55:33 -08:00
fib_semantics.c ipv4: fix nexthop attlen check in fib_nh_match 2014-11-14 08:59:42 -08:00
fib_trie.c
gre_demux.c ip_tunnel: Fix dst ref-count. 2014-03-26 15:18:40 -04:00
gre_offload.c gre: Set inner mac header in gro complete 2014-12-16 09:34:27 -08:00
icmp.c ipv4: icmp: Fix pMTU handling for rare case 2014-07-28 08:06:00 -07:00
igmp.c inetpeer: get rid of ip_id_count 2014-08-14 09:38:23 +08:00
inet_connection_sock.c net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
inet_diag.c inet_diag: fix inet_diag_dump_icsk() to use correct state for timewait sockets 2014-01-13 22:35:46 -08:00
inet_fragment.c inet: frag: make sure forced eviction removes all frags 2014-03-06 15:28:45 -05:00
inet_hashtables.c
inet_lro.c lro: remove dead code 2013-12-29 16:34:25 -05:00
inet_timewait_sock.c
inetpeer.c inetpeer: get rid of ip_id_count 2014-08-14 09:38:23 +08:00
ip_forward.c ipv4: try to cache dst_entries which would cause a redirect 2015-02-26 17:50:10 -08:00
ip_fragment.c net: Add utility functions to clear rxhash 2013-12-17 16:36:21 -05:00
ip_gre.c gre: fix the inner mac header in nbma tunnel xmit path 2015-01-27 08:18:52 -08:00
ip_input.c net: Fix memory leak if TPROXY used with TCP early demux 2014-01-27 16:22:11 -08:00
ip_options.c ipv4: fix buffer overflow in ip_options_compile() 2014-07-28 08:06:01 -07:00
ip_output.c ipv4: tcp: get rid of ugly unicast_sock 2015-02-26 17:50:12 -08:00
ip_sockglue.c ip: zero sockaddr returned on error queue 2015-02-26 17:50:10 -08:00
ip_tunnel.c ip_tunnel(ipv4): fix tunnels with "local any remote $remote_ip" 2014-08-14 09:38:23 +08:00
ip_tunnel_core.c ipv4: fix a potential use after free in ip_tunnel_core.c 2014-11-14 08:59:43 -08:00
ip_vti.c ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic 2014-12-16 09:34:27 -08:00
ipcomp.c
ipconfig.c ipv4: ipconfig.c: add parentheses in an if statement 2014-02-14 00:14:23 -05:00
ipip.c ipip, sit: fix ipv4_{update_pmtu,redirect} calls 2014-06-26 15:15:40 -04:00
ipmr.c inetpeer: get rid of ip_id_count 2014-08-14 09:38:23 +08:00
netfilter.c
ping.c ping: Fix race in free in receive path 2015-02-26 17:50:11 -08:00
proc.c ipv4: spaces required around that '=' 2014-01-02 03:30:36 -05:00
protocol.c net: remove outdated comment for ipv4 and ipv6 protocol handler 2013-11-28 18:47:51 -05:00
raw.c inetpeer: get rid of ip_id_count 2014-08-14 09:38:23 +08:00
route.c ipv4: try to cache dst_entries which would cause a redirect 2015-02-26 17:50:10 -08:00
syncookies.c ipv4: fix checkpatch error "space prohibited" 2013-12-26 13:43:21 -05:00
sysctl_net_ipv4.c ipv4: introduce ip_dst_mtu_maybe_forward and protect forwarding path against pmtu spoofing 2014-01-13 11:22:54 -08:00
tcp.c tcp: md5: do not use alloc_percpu() 2014-11-14 08:59:43 -08:00
tcp_bic.c
tcp_cong.c tcp: reduce the bloat caused by tcp_is_cwnd_limited() 2014-02-24 19:13:38 -05:00
tcp_cubic.c tcp_cubic: fix the range of delayed_ack 2014-05-31 13:20:36 -07:00
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c remove extra definitions of U32_MAX 2014-01-23 16:36:55 -08:00
tcp_input.c tcp: fix ssthresh and undo for consecutive short FRTO episodes 2014-10-15 08:36:40 +02:00
tcp_ipv4.c ipv4: tcp: get rid of ugly unicast_sock 2015-02-26 17:50:12 -08:00
tcp_lp.c
tcp_memcontrol.c tcp_memcontrol: Cleanup/fix cg_proto->memory_pressure handling. 2013-12-05 21:01:01 -05:00
tcp_metrics.c tcp: metrics: Handle v6/v4-mapped sockets in tcp-metrics 2014-01-23 12:48:28 -08:00
tcp_minisocks.c ipv6: tcp: fix flowlabel value in ACK messages send from TIME_WAIT 2014-01-17 17:56:33 -08:00
tcp_offload.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-28 08:06:01 -07:00
tcp_output.c tcp: Do not apply TSO segment limit to non-TSO packets 2015-01-27 08:18:53 -08:00
tcp_probe.c ipv4: ERROR: do not initialise globals to 0 or NULL 2013-12-26 13:43:21 -05:00
tcp_scalable.c
tcp_timer.c
tcp_vegas.c tcp: Fix integer-overflow in TCP vegas 2014-08-14 09:38:24 +08:00
tcp_vegas.h
tcp_veno.c tcp: Fix integer-overflows in TCP veno 2014-08-14 09:38:23 +08:00
tcp_westwood.c
tcp_yeah.c ipv4: ipv4: Cleanup the comments in tcp_yeah.c 2013-12-26 13:43:55 -05:00
tunnel4.c
udp.c udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup 2014-06-26 15:15:40 -04:00
udp_diag.c udp_diag: Fix socket skipping within chain 2015-02-26 17:50:11 -08:00
udp_impl.h
udp_offload.c net/ipv4: Use proper RCU APIs for writer-side in udp_offload.c 2014-02-04 20:01:55 -08:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c ipv4: ERROR: code indent should use tabs where possible 2013-12-26 13:43:21 -05:00
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c inetpeer: get rid of ip_id_count 2014-08-14 09:38:23 +08:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c inet: make no_pmtu_disc per namespace and kill ipv4_config 2013-12-18 16:58:20 -05:00
xfrm4_tunnel.c