]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: terminate manual loop iterator loop correctly for non-vecs
authorJens Axboe <axboe@kernel.dk>
Fri, 18 Mar 2022 17:28:13 +0000 (11:28 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Mar 2022 17:42:48 +0000 (11:42 -0600)
commit32a856d42e4e85a4ebbf448c2ff60446edb4cd7b
treed91130d04ab34d254377cab86f374a9ede91a5da
parent34f7f7a48b35e7625c93a62cc9fa7440069ff280
io_uring: terminate manual loop iterator loop correctly for non-vecs

The fix for not advancing the iterator if we're using fixed buffers is
broken in that it can hit a condition where we don't terminate the loop.
This results in io-wq looping forever, asking to read (or write) 0 bytes
for every subsequent loop.

Reported-by: Joel Jaeschke <joel.jaeschke@gmail.com>
Link: https://github.com/axboe/liburing/issues/549
Fixes: 2ce3ec00e46a ("io_uring: ensure symmetry in handling iter types in loop_rw_iter()")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c