summaryrefslogtreecommitdiff
path: root/io_uring/net.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-10-31 17:37:21 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2022-10-31 17:37:21 +1100
commitf98b4d13717a58b15c00880d2ccd24972316b430 (patch)
treec3b50090ee3ef4b15b7874ae237d76710108674c /io_uring/net.c
parent65722736c3baf29e02e964a09e85c9ef71c48e8d (diff)
parent247f34f7b80357943234f93f247a1ae6b6c3a740 (diff)
Merge tag 'v6.1-rc2' into fixes
Merge rc2 into our fixes branch, which was based on rc1 but wasn't merged until rc3, so that for the remainder of the release our fixes branch will be based on rc2 for the purposes of resolving conflicts with other trees (if necessary).
Diffstat (limited to 'io_uring/net.c')
-rw-r--r--io_uring/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index 8c7226b5bf41..15dea91625e2 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1056,6 +1056,8 @@ int io_send_zc(struct io_kiocb *req, unsigned int issue_flags)
sock = sock_from_file(req->file);
if (unlikely(!sock))
return -ENOTSOCK;
+ if (!test_bit(SOCK_SUPPORT_ZC, &sock->flags))
+ return -EOPNOTSUPP;
msg.msg_name = NULL;
msg.msg_control = NULL;
@@ -1151,6 +1153,8 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
sock = sock_from_file(req->file);
if (unlikely(!sock))
return -ENOTSOCK;
+ if (!test_bit(SOCK_SUPPORT_ZC, &sock->flags))
+ return -EOPNOTSUPP;
if (req_has_async_data(req)) {
kmsg = req->async_data;