diff --git a/io_uring/nop.c b/io_uring/nop.c index 6d470d4251ee..a10d0a0aef96 100644 --- a/io_uring/nop.c +++ b/io_uring/nop.c @@ -37,6 +37,9 @@ int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) nop->result = 0; if (nop->flags & IORING_NOP_FIXED_FILE) nop->fd = READ_ONCE(sqe->fd); + else + nop->fd = 0; + if (nop->flags & IORING_NOP_FIXED_BUFFER) nop->buffer = READ_ONCE(sqe->buf_index); return 0;