Skip to content

Commit 9cc0bbd

Browse files
isilenceaxboe
authored andcommitted
io_uring/msg: initialise msg request opcode
It's risky to have msg request opcode set to garbage, so at least initialise it to nop. Later we might want to add a user inaccessible opcode for such cases. Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/9afe650fcb348414a4529d89f52eb8969ba06efd.1743190078.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent b0e9570 commit 9cc0bbd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io_uring/msg_ring.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static int io_msg_remote_post(struct io_ring_ctx *ctx, struct io_kiocb *req,
9393
kmem_cache_free(req_cachep, req);
9494
return -EOWNERDEAD;
9595
}
96+
req->opcode = IORING_OP_NOP;
9697
req->cqe.user_data = user_data;
9798
io_req_set_res(req, res, cflags);
9899
percpu_ref_get(&ctx->refs);

0 commit comments

Comments
 (0)