projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd94903
)
io_uring: make io_fill_cqe_aux honour CQE32
author
Pavel Begunkov
<asml.silence@gmail.com>
Wed, 15 Jun 2022 10:23:07 +0000
(11:23 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 15 Jun 2022 11:06:56 +0000
(
05:06
-0600)
Don't let io_fill_cqe_aux() post 16B cqes for CQE32 rings, neither the
kernel nor the userspace expect this to happen.
Fixes: 76c68fbf1a1f9 ("io_uring: enable CQE32")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/64fae669fae1b7083aa15d0cd807f692b0880b9a.1655287457.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 792e9c95d2176313e2c2c0ca94c61181a8a5677f..5d479428d8e52282d7312bd6ac8c2cc391a4063c 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-2518,6
+2518,11
@@
static noinline bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data,
WRITE_ONCE(cqe->user_data, user_data);
WRITE_ONCE(cqe->res, res);
WRITE_ONCE(cqe->flags, cflags);
+
+ if (ctx->flags & IORING_SETUP_CQE32) {
+ WRITE_ONCE(cqe->big_cqe[0], 0);
+ WRITE_ONCE(cqe->big_cqe[1], 0);
+ }
return true;
}
return io_cqring_event_overflow(ctx, user_data, res, cflags, 0, 0);