io_uring: Fix incorrect ordering of assinments of sqe and opcode
Subsystems (2)
PATCH 1/1 io_uring: Fix incorrect ordering of assinments of sqe and opcode
Currently opcode is being assigned to a dereferenced pointer sqe before sqe is being assigned. It appears the order of these two assignments cs the wrong way around. Fix this by swapping the order of the assignments.
Fixes 31dc41afdef2 ("io_uring: add support for IORING_SETUP_SQE_MIXED")
Signed-off-by Colin Ian King <[email protected]>
--- io_uring/fdinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/fdinfo.c +1 -1
@@ -100,8 +100,8 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)if (sq_idx > sq_mask)continue ; - opcode =READ_ONCE (sqe->opcode); sqe = &ctx->sq_sqes[sq_idx << sq_shift]; + opcode =READ_ONCE (sqe->opcode);if (sq_shift) { sqe128 = true; }else if (io_issue_defs[opcode].is_128) {
Signature · 1 line
2.51.0
Jens Axboe
maintainerQuoted 3 lines · Colin Ian King
Currently opcode is being assigned to a dereferenced pointer sqe before sqe is being assigned. It appears the order of these two assignments cs the wrong way around. Fix this by swapping the order of the assignments.
Fix for this has already been folded in.
Signature · 1 line
Jens Axboe