android_kernel_google_msm/net/ipv4
Eric Dumazet 1c50a0ae29 udp: fix behavior of wrong checksums
commit beb39db59d14990e401e235faf66a6b9b31240b0 upstream.

We have two problems in UDP stack related to bogus checksums :

1) We return -EAGAIN to application even if receive queue is not empty.
   This breaks applications using edge trigger epoll()

2) Under UDP flood, we can loop forever without yielding to other
   processes, potentially hanging the host, especially on non SMP.

This patch is an attempt to make things better.

We might in the future add extra support for rt applications
wanting to better control time spent doing a recv() in a hostile
environment. For example we could validate checksums before queuing
packets in socket receive queue.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-09-18 09:20:47 +08:00
..
netfilter netfilter: ipv4: defrag: set local_df flag on defragmented skb 2014-06-16 13:45:45 -07:00
af_inet.c ipv6: use a stronger hash for tcp 2013-02-28 06:59:06 -08:00
ah4.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
arp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cipso_ipv4.c cipso: don't follow a NULL pointer when setsockopt() is called 2012-08-09 08:31:42 -07:00
datagram.c ipv4: fix possible seqlock deadlock 2013-12-08 07:29:41 -08:00
devinet.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
esp4.c esp4: fix error return code in esp_output() 2013-05-01 09:41:07 -07:00
fib_frontend.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
fib_lookup.h
fib_rules.c
fib_semantics.c ipv4: fib_semantics: increment fib_info_cnt after fib_info allocation 2014-06-07 16:01:59 -07:00
fib_trie.c fib_trie: remove potential out of bound access 2013-09-14 06:02:09 -07:00
gre.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
icmp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
igmp.c inetpeer: get rid of ip_id_count 2014-08-14 08:42:35 +08:00
inet_connection_sock.c inet: Fix kmemleak in tcp_v4/6_syn_recv_sock and dccp_v4/6_request_recv_sock 2013-01-11 09:07:14 -08:00
inet_diag.c inet_diag: fix inet_diag_dump_icsk() timewait socket state logic 2014-02-06 11:05:48 -08:00
inet_fragment.c inet: limit length of fragment queue hash table bucket lists 2013-03-28 12:11:54 -07:00
inet_hashtables.c net: do not call sock_put() on TIMEWAIT sockets 2013-11-04 04:23:40 -08:00
inet_lro.c
inet_timewait_sock.c
inetpeer.c inetpeer: get rid of ip_id_count 2014-08-14 08:42:35 +08:00
ip_forward.c Revert: "net: ip, ipv6: handle gso skbs in forwarding path" 2014-08-07 12:00:11 -07:00
ip_fragment.c net: drop dst before queueing fragments 2013-05-01 09:41:20 -07:00
ip_gre.c ip_tunnel: fix kernel panic with icmp_dest_unreach 2013-06-27 11:27:32 -07:00
ip_input.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ip_options.c ipv4: fix buffer overflow in ip_options_compile() 2014-07-28 07:06:46 -07:00
ip_output.c Patch for 3.2.x, 3.4.x IP identifier regression 2015-02-02 17:05:26 +08:00
ip_sockglue.c inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions 2013-12-08 07:29:42 -08:00
ipcomp.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
ipconfig.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
ipip.c net: tunnels - enable module autoloading 2014-06-26 15:10:28 -04:00
ipmr.c inetpeer: get rid of ip_id_count 2014-08-14 08:42:35 +08:00
Kconfig net: Fix build regression when INET_UDP_DIAG=y and IPV6=m 2012-02-07 13:35:28 -05:00
Makefile
netfilter.c
ping.c ipv4: Missing sk_nulls_node_init() in ping_unhash(). 2015-09-18 09:20:46 +08:00
proc.c tcp: implement RFC 5961 4.2 2013-01-11 09:07:15 -08:00
protocol.c
raw.c inetpeer: get rid of ip_id_count 2014-08-14 08:42:35 +08:00
route.c ipv4: disable bh while doing route gc 2014-12-01 18:02:44 +08:00
syncookies.c tcp: incoming connections might use wrong route under synflood 2013-05-01 09:41:07 -07:00
sysctl_net_ipv4.c sysctl net: Keep tcp_syn_retries inside the boundary 2013-08-11 15:38:44 -07:00
tcp.c tcp: fix tcp_md5_hash_skb_data() 2013-06-27 11:27:30 -07:00
tcp_bic.c
tcp_cong.c tcp: Apply device TSO segment limit earlier 2012-10-02 10:29:34 -07:00
tcp_cubic.c tcp_cubic: fix the range of delayed_ack 2014-06-07 16:01:59 -07:00
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c net: fix divide by zero in tcp algorithm illinois 2012-11-17 13:16:17 -08:00
tcp_input.c tcp: fix false undo corner cases 2014-07-28 07:06:45 -07:00
tcp_ipv4.c inet: fix possible seqlock deadlocks 2013-12-08 07:29:42 -08:00
tcp_lp.c
tcp_memcontrol.c Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2012-03-20 18:11:21 -07:00
tcp_minisocks.c tcp: md5: rcu conversion 2012-01-31 12:14:00 -05:00
tcp_output.c tcp: fix false undo corner cases 2014-07-28 07:06:45 -07:00
tcp_probe.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
tcp_scalable.c
tcp_timer.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
tcp_vegas.c tcp: Fix integer-overflow in TCP vegas 2014-08-14 08:42:36 +08:00
tcp_vegas.h
tcp_veno.c tcp: Fix integer-overflows in TCP veno 2014-08-14 08:42:36 +08:00
tcp_westwood.c
tcp_yeah.c
tunnel4.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
udp.c udp: fix behavior of wrong checksums 2015-09-18 09:20:47 +08:00
udp_diag.c udp_diag: implement idiag_get_info for udp/udplite to get queue information 2012-04-25 20:43:01 -04:00
udp_impl.h
udplite.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
xfrm4_input.c
xfrm4_mode_beet.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c inetpeer: get rid of ip_id_count 2014-08-14 08:42:35 +08:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00