diff options
author | Eric Dumazet <edumazet@google.com> | 2015-04-21 18:32:24 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-22 14:13:11 -0400 |
commit | d83769a580f1132ac26439f50068a29b02be535e (patch) | |
tree | b18a104e87454d5505c3d0e5f1c2e7f26ce9b89c /lib | |
parent | 5e6c94a999f67f120c6bbba71bbee840dfee6338 (diff) | |
download | linux-d83769a580f1132ac26439f50068a29b02be535e.tar.bz2 |
tcp: fix possible deadlock in tcp_send_fin()
Using sk_stream_alloc_skb() in tcp_send_fin() is dangerous in
case a huge process is killed by OOM, and tcp_mem[2] is hit.
To be able to free memory we need to make progress, so this
patch allows FIN packets to not care about tcp_mem[2], if
skb allocation succeeded.
In a follow-up patch, we might abort tcp_send_fin() infinite loop
in case TIF_MEMDIE is set on this thread, as memory allocator
did its best getting extra memory already.
This patch reverts d22e15371811 ("tcp: fix tcp fin memory accounting")
Fixes: d22e15371811 ("tcp: fix tcp fin memory accounting")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions