* [PATCH] io_uring: re-set iov base/len for buffer select retry
@ 2020-06-04 17:42 Jens Axboe
0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2020-06-04 17:42 UTC (permalink / raw)
To: io-uring
We already have the buffer selected, but we should set the iter list
again.
Cc: [email protected] # v5.7
Signed-off-by: Jens Axboe <[email protected]>
---
diff --git a/fs/io_uring.c b/fs/io_uring.c
index d2bd82387a4c..70f0f2f940fb 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2363,8 +2363,14 @@ static ssize_t __io_iov_buffer_select(struct io_kiocb *req, struct iovec *iov,
static ssize_t io_iov_buffer_select(struct io_kiocb *req, struct iovec *iov,
bool needs_lock)
{
- if (req->flags & REQ_F_BUFFER_SELECTED)
+ if (req->flags & REQ_F_BUFFER_SELECTED) {
+ struct io_buffer *kbuf;
+
+ kbuf = (struct io_buffer *) (unsigned long) req->rw.addr;
+ iov[0].iov_base = u64_to_user_ptr(kbuf->addr);
+ iov[0].iov_len = kbuf->len;
return 0;
+ }
if (!req->rw.len)
return 0;
else if (req->rw.len > 1)
--
Jens Axboe
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-04 17:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 17:42 [PATCH] io_uring: re-set iov base/len for buffer select retry Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox