summaryrefslogtreecommitdiff
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-03-14 19:49:19 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-14 19:51:28 +0300
commitced68234b6a244355aeab07c2681bc49f695eaed (patch)
tree38f43d6e42f562bcae799dae9238502a086cf785 /net/core/sock.c
parent29d1df72ce2ac187d457990fe445a16212dcfa19 (diff)
downloadlinux-ced68234b6a244355aeab07c2681bc49f695eaed.tar.xz
sock: remove zerocopy sockopt restriction on closed tcp state
Socket option SO_ZEROCOPY determines whether the kernel ignores or processes flag MSG_ZEROCOPY on subsequent send calls. This to avoid changing behavior for legacy processes. Limiting the state change to closed sockets is annoying with passive sockets and not necessary for correctness. Once created, zerocopy skbs are processed based on their private state, not this socket flag. Remove the constraint. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 27f218bba43f..a8962d912895 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1052,8 +1052,6 @@ set_rcvbuf:
if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6) {
if (sk->sk_protocol != IPPROTO_TCP)
ret = -ENOTSUPP;
- else if (sk->sk_state != TCP_CLOSE)
- ret = -EBUSY;
} else if (sk->sk_family != PF_RDS) {
ret = -ENOTSUPP;
}