]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: allow MSG_ZEROCOPY transmission also in CLOSE_WAIT state
authorWillem de Bruijn <willemb@google.com>
Thu, 10 Jan 2019 19:40:33 +0000 (14:40 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jan 2019 05:43:18 +0000 (21:43 -0800)
commita479b26a883f7a732ab53bbba61719181436b832
treeea9db4125b57bbd99dc0e793ee8276376f318c49
parentbd472f02c3bca66e770b0c609544c3e61b171c4c
tcp: allow MSG_ZEROCOPY transmission also in CLOSE_WAIT state

TCP transmission with MSG_ZEROCOPY fails if the peer closes its end of
the connection and so transitions this socket to CLOSE_WAIT state.

Transmission in close wait state is acceptable. Other similar tests in
the stack (e.g., in FastOpen) accept both states. Relax this test, too.

Link: https://www.mail-archive.com/netdev@vger.kernel.org/msg276886.html
Link: https://www.mail-archive.com/netdev@vger.kernel.org/msg227390.html
Fixes: 4a95e07edd18 ("tcp: enable MSG_ZEROCOPY")
Reported-by: Marek Majkowski <marek@cloudflare.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
CC: Yuchung Cheng <ycheng@google.com>
CC: Neal Cardwell <ncardwell@google.com>
CC: Soheil Hassas Yeganeh <soheil@google.com>
CC: Alexey Kodanev <alexey.kodanev@oracle.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c