Skip to content

Commit 9c3a205

Browse files
isilenceaxboe
authored andcommitted
io_uring: fix ITER_BVEC check
iov_iter::type is a bitmask that also keeps direction etc., so it shouldn't be directly compared against ITER_*. Use proper helper. Fixes: ff6165b ("io_uring: retain iov_iter state over io_read/io_write calls") Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Cc: <stable@vger.kernel.org> # 5.9 Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent eb2667b commit 9c3a205

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,7 @@ static void io_req_map_rw(struct io_kiocb *req, const struct iovec *iovec,
31933193
rw->free_iovec = iovec;
31943194
rw->bytes_done = 0;
31953195
/* can only be fixed buffers, no need to do anything */
3196-
if (iter->type == ITER_BVEC)
3196+
if (iov_iter_is_bvec(iter))
31973197
return;
31983198
if (!iovec) {
31993199
unsigned iov_off = 0;

0 commit comments

Comments
 (0)