Skip to content

Commit 74566df

Browse files
committed
io_uring: don't setup async context for read/write fixed
We don't need it, and if we have it, then the retry handler will attempt to copy the non-existent iovec with the inline iovec, with a segment count that doesn't make sense. Fixes: f67676d ("io_uring: ensure async punted read/write requests copy iovec") Reported-by: Jonathan Lemon <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent eacc6df commit 74566df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/io_uring.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,6 +1786,9 @@ static int io_setup_async_rw(struct io_kiocb *req, ssize_t io_size,
17861786
struct iovec *iovec, struct iovec *fast_iov,
17871787
struct iov_iter *iter)
17881788
{
1789+
if (req->opcode == IORING_OP_READ_FIXED ||
1790+
req->opcode == IORING_OP_WRITE_FIXED)
1791+
return 0;
17891792
if (!req->io && io_alloc_async_ctx(req))
17901793
return -ENOMEM;
17911794

0 commit comments

Comments
 (0)