--- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -3497,6 +3497,10 @@ static int io_renameat_prep(struct io_ki struct io_rename *ren = &req->rename; const char __user *oldf, *newf; + if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) + return -EINVAL; + if (sqe->ioprio || sqe->buf_index) + return -EINVAL; if (unlikely(req->flags & REQ_F_FIXED_FILE)) return -EBADF;