summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-08-26 09:19:15 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-10 10:32:21 +0100
commit8e6521f6404e704fac313ab2479923be1f741f73 (patch)
tree73874d9882b8406b63c430d63414d0ca354b2b02 /security
parenta8ec90c7363e2f376315ad50b4e2d3d87aa2cf69 (diff)
tcp: remove empty skb from write queue in error cases
[ Upstream commit fdfc5c8594c24c5df883583ebd286321a80e0a67 ] Vladimir Rutsky reported stuck TCP sessions after memory pressure events. Edge Trigger epoll() user would never receive an EPOLLOUT notification allowing them to retry a sendmsg(). Jason tested the case of sk_stream_alloc_skb() returning NULL, but there are other paths that could lead both sendmsg() and sendpage() to return -1 (EAGAIN), with an empty skb queued on the write queue. This patch makes sure we remove this empty skb so that Jason code can detect that the queue is empty, and call sk->sk_write_space(sk) accordingly. Fixes: ce5ec440994b ("tcp: ensure epoll edge trigger wakeup when write queue is empty") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jason Baron <jbaron@akamai.com> Reported-by: Vladimir Rutsky <rutsky@google.com> Cc: Soheil Hassas Yeganeh <soheil@google.com> Cc: Neal Cardwell <ncardwell@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions