io_uring: open/close and SQPOLL
Do I miss something, or open/close/etc need an explicit check for IORING_SETUP_SQPOLL? E.g., now an open() request somehow returns -EFAULT, and that doesn't seem good.
fs/io_uring.c +4 -0
@@ -3023,6 +3023,8 @@ static int io_openat2_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)size_t len;int ret; +if (unlikely (req->ctx->flags & (IORING_SETUP_IOPOLL |IORING_SETUP_SQPOLL ))) +return -EINVAL ;if (sqe->ioprio || sqe->buf_index)return -EINVAL ;if (req->flags &REQ_F_FIXED_FILE )
@@ -3417,6 +3419,8 @@ static int io_close_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)*/ req->work.flags |=IO_WQ_WORK_NO_CANCEL ; +if (unlikely (req->ctx->flags & (IORING_SETUP_IOPOLL |IORING_SETUP_SQPOLL ))) +return -EINVAL ;if (sqe->ioprio || sqe->off || sqe->addr || sqe->len || sqe->rw_flags || sqe->buf_index)return -EINVAL ;
Signature · 1 line
Pavel Begunkov
Jens Axboe
maintainerQuoted 3 lines · Pavel Begunkov
Do I miss something, or open/close/etc need an explicit check for
IORING_SETUP_SQPOLL? E.g., now anopen()request somehow returns-EFAULT, and that doesn't seem good.
Probably best just to disable them - can you send a real patch?
Signature · 1 line
Jens Axboe