summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-17 20:14:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-04 13:39:24 +0300
commita3025359ffa707b484b23f4df37425f36e6955fd (patch)
treece763bee3ff8cb6dcc974d75aec299030c3b4f31 /net/socket.c
parent6ef2b4728a00c98cc1163212443e39d79a4c2c94 (diff)
downloadlinux-a3025359ffa707b484b23f4df37425f36e6955fd.tar.xz
net: remove cmsg restriction from io_uring based send/recvmsg calls
[ Upstream commit e54937963fa249595824439dc839c948188dea83 ] No need to restrict these anymore, as the worker threads are direct clones of the original task. Hence we know for a fact that we can support anything that the regular task can. Since the only user of proto_ops->flags was to flag PROTO_CMSG_DATA_ONLY, kill the member and the flag definition too. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/net/socket.c b/net/socket.c
index 56c218dc80ce..8657112a687a 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2419,10 +2419,6 @@ static int ___sys_sendmsg(struct socket *sock, struct user_msghdr __user *msg,
long __sys_sendmsg_sock(struct socket *sock, struct msghdr *msg,
unsigned int flags)
{
- /* disallow ancillary data requests from this path */
- if (msg->msg_control || msg->msg_controllen)
- return -EINVAL;
-
return ____sys_sendmsg(sock, msg, flags, NULL, 0);
}
@@ -2631,12 +2627,6 @@ long __sys_recvmsg_sock(struct socket *sock, struct msghdr *msg,
struct user_msghdr __user *umsg,
struct sockaddr __user *uaddr, unsigned int flags)
{
- if (msg->msg_control || msg->msg_controllen) {
- /* disallow ancillary data reqs unless cmsg is plain data */
- if (!(sock->ops->flags & PROTO_CMSG_DATA_ONLY))
- return -EINVAL;
- }
-
return ____sys_recvmsg(sock, msg, umsg, uaddr, flags, 0);
}