summaryrefslogtreecommitdiff
path: root/net/ipv4/Kconfig
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-04-23 20:42:39 +0300
committerDavid S. Miller <davem@davemloft.net>2015-04-24 18:06:48 +0300
commit845704a535e9b3c76448f52af1b70e4422ea03fd (patch)
tree3a14cdcb01442f0f4d61a3161a9ac508bbdb3732 /net/ipv4/Kconfig
parente4b6c30375e83b92d9c3e9b9d853417e8cc74006 (diff)
downloadlinux-845704a535e9b3c76448f52af1b70e4422ea03fd.tar.xz
tcp: avoid looping in tcp_send_fin()
Presence of an unbound loop in tcp_send_fin() had always been hard to explain when analyzing crash dumps involving gigantic dying processes with millions of sockets. Lets try a different strategy : In case of memory pressure, try to add the FIN flag to last packet in write queue, even if packet was already sent. TCP stack will be able to deliver this FIN after a timeout event. Note that this FIN being delivered by a retransmit, it also carries a Push flag given our current implementation. By checking sk_under_memory_pressure(), we anticipate that cooking many FIN packets might deplete tcp memory. In the case we could not allocate a packet, even with __GFP_WAIT allocation, then not sending a FIN seems quite reasonable if it allows to get rid of this socket, free memory, and not block the process from eventually doing other useful work. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/Kconfig')
0 files changed, 0 insertions, 0 deletions