From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 5.19 6/6] io_uring: make io_fill_cqe_aux to honour CQE32
Date: Wed, 15 Jun 2022 11:23:07 +0100 [thread overview]
Message-ID: <64fae669fae1b7083aa15d0cd807f692b0880b9a.1655287457.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
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 <[email protected]>
---
fs/io_uring.c | 5 +++++
1 file changed, 5 insertions(+)
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);
--
2.36.1
prev parent reply other threads:[~2022-06-15 10:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 10:23 [PATCH 5.19 0/6] CQE32 fixes Pavel Begunkov
2022-06-15 10:23 ` [PATCH 5.19 1/6] io_uring: get rid of __io_fill_cqe{32}_req() Pavel Begunkov
2022-06-15 10:23 ` [PATCH 5.19 2/6] io_uring: unite fill_cqe and the 32B version Pavel Begunkov
2022-06-15 10:23 ` [PATCH 5.19 3/6] io_uring: fill extra big cqe fields from req Pavel Begunkov
2022-06-15 10:23 ` [PATCH 5.19 4/6] io_uring: fix ->extra{1,2} misuse Pavel Begunkov
2022-06-15 10:23 ` [PATCH 5.19 5/6] io_uring: inline __io_fill_cqe() Pavel Begunkov
2022-06-15 10:23 ` Pavel Begunkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64fae669fae1b7083aa15d0cd807f692b0880b9a.1655287457.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox