diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-06-15 11:23:07 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-06-15 05:06:56 -0600 |
commit | c5595975b53a487bf329eeba65b5c5f34605a4c0 (patch) | |
tree | a1152eed4f3fb550afa2008c0278c49bc8a26e87 /fs/io_uring.c | |
parent | cd94903d3ba50d7ae797c603f68996af8d1ba1a1 (diff) | |
download | linux-stable-c5595975b53a487bf329eeba65b5c5f34605a4c0.tar.gz linux-stable-c5595975b53a487bf329eeba65b5c5f34605a4c0.tar.bz2 linux-stable-c5595975b53a487bf329eeba65b5c5f34605a4c0.zip |
io_uring: make io_fill_cqe_aux honour CQE32
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>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 792e9c95d217..5d479428d8e5 100644 --- 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); |