--- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -3548,6 +3548,10 @@ static int io_unlinkat_prep(struct io_ki struct io_unlink *un = &req->unlink; const char __user *fname; + if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) + return -EINVAL; + if (sqe->ioprio || sqe->off || sqe->len || sqe->buf_index) + return -EINVAL; if (unlikely(req->flags & REQ_F_FIXED_FILE)) return -EBADF;