diff --git a/io_uring/net.c b/io_uring/net.c index 8c7226b5bf41381f3ab720c7ea4bd9d2c2a7ccd3..26ff3675214db58a812fab9b9c70dd68d408aa66 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;