io_uring: fix EIOCBQUEUED iter revert
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 1 Apr 2021 11:18:48 +0000 (12:18 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Apr 2021 15:31:21 +0000 (09:31 -0600)
commit07204f21577a1d882f0259590c3553fe6a476381
treea581bb61e2722e70687801c9c9ec7c907ffaa24c
parent696ee88a7c50f96573f98aa76cc74286033140c1
io_uring: fix EIOCBQUEUED iter revert

iov_iter_revert() is done in completion handlers that happensf before
read/write returns -EIOCBQUEUED, no need to repeat reverting afterwards.
Moreover, even though it may appear being just a no-op, it's actually
races with 1) user forging a new iovec of a different size 2) reissue,
that is done via io-wq continues completely asynchronously.

Fixes: 3e6a0d3c7571c ("io_uring: fix -EAGAIN retry with IOPOLL")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c