projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0e9570
)
io_uring/msg: initialise msg request opcode
author
Pavel Begunkov
<asml.silence@gmail.com>
Fri, 28 Mar 2025 23:11:50 +0000
(23:11 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 28 Mar 2025 23:13:09 +0000
(17:13 -0600)
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 <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/9afe650fcb348414a4529d89f52eb8969ba06efd.1743190078.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/msg_ring.c
patch
|
blob
|
blame
|
history
diff --git
a/io_uring/msg_ring.c
b/io_uring/msg_ring.c
index bea5a96587b752f2390d0426c6cfc4a12e86211d..6c51b942d020d0b13dddc29f1d7939073099fdb7 100644
(file)
--- 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);