From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
<[email protected]>
Cc: <[email protected]>, Dylan Yudaken <[email protected]>
Subject: [PATCH for-next 1/4] io_uring: fix multishot ending when not polled
Date: Fri, 8 Jul 2022 11:18:35 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
If multishot is not actually polling then return IOU_OK rather than the
result.
If the result was > 0 this will confuse things further up the callstack
which expect a return <= 0.
Fixes: 1300ebb20286 ("io_uring: multishot recv")
Signed-off-by: Dylan Yudaken <[email protected]>
---
io_uring/net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/io_uring/net.c b/io_uring/net.c
index ba7e94ff287c..188edbed1eb7 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -508,6 +508,8 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, unsigned int c
if (req->flags & REQ_F_POLLED)
*ret = IOU_STOP_MULTISHOT;
+ else
+ *ret = IOU_OK;
return true;
}
--
2.30.2
next prev parent reply other threads:[~2022-07-08 18:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 18:18 [PATCH for-next 0/4] io_uring: multishot recv cleanups Dylan Yudaken
2022-07-08 18:18 ` Dylan Yudaken [this message]
2022-07-08 18:18 ` [PATCH for-next 2/4] io_uring: support 0 length iov in buffer select in compat Dylan Yudaken
2022-07-08 18:18 ` [PATCH for-next 3/4] io-uring: add recycle_async to ops Dylan Yudaken
2022-07-08 18:18 ` [PATCH for-next 4/4] io_uring: move netmsg recycling into io_uring cleanup Dylan Yudaken
2022-07-11 20:54 ` (subset) [PATCH for-next 0/4] io_uring: multishot recv cleanups Jens Axboe
2022-07-11 20:55 ` Jens Axboe
2022-07-12 8:32 ` Dylan Yudaken
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 \
[email protected] \
[email protected] \
[email protected] \
[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