diff options
| author | Pavel Begunkov <[email protected]> | 2025-03-28 23:11:50 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-03-28 23:13:09 +0000 |
| commit | 9cc0bbdaba2a66ad90bc6ce45163b7745baffe98 (patch) | |
| tree | ba6ca62bd51693134b1c261aacfdb3f9c47d009d /io_uring/msg_ring.c | |
| parent | io_uring/msg: rename io_double_lock_ctx() (diff) | |
| download | kernel-9cc0bbdaba2a66ad90bc6ce45163b7745baffe98.tar.gz kernel-9cc0bbdaba2a66ad90bc6ce45163b7745baffe98.zip | |
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]>
Diffstat (limited to 'io_uring/msg_ring.c')
| -rw-r--r-- | io_uring/msg_ring.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index bea5a96587b7..6c51b942d020 100644 --- a/io_uring/msg_ring.c +++ b/io_uring/msg_ring.c @@ -93,6 +93,7 @@ static int io_msg_remote_post(struct io_ring_ctx *ctx, struct io_kiocb *req, kmem_cache_free(req_cachep, req); return -EOWNERDEAD; } + req->opcode = IORING_OP_NOP; req->cqe.user_data = user_data; io_req_set_res(req, res, cflags); percpu_ref_get(&ctx->refs); |
