]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fastopen: avoid negative sk_forward_alloc
authorEric Dumazet <edumazet@google.com>
Wed, 7 Sep 2016 15:34:11 +0000 (08:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Sep 2016 23:08:10 +0000 (16:08 -0700)
commitdb2343cdcaa5bc70964e850edf719a19e11636c2
treeb60c15dd39cb9e40f06d49dafa65402380ae5693
parent4e802943d1e9789bee6ca7284da2becc268d7677
tcp: fastopen: avoid negative sk_forward_alloc

When DATA and/or FIN are carried in a SYN/ACK message or SYN message,
we append an skb in socket receive queue, but we forget to call
sk_forced_mem_schedule().

Effect is that the socket has a negative sk->sk_forward_alloc as long as
the message is not read by the application.

Josh Hunt fixed a similar issue in commit b7d497ca0fcc ("tcp: fix tcp
fin memory accounting")

Fixes: 56ea9b938e8e ("tcp: TCP Fast Open Server - main code path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Josh Hunt <johunt@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_fastopen.c