]> git.itanic.dy.fi Git - linux-stable/commit
io_uring: clear req->result on IOPOLL re-issue
authorJens Axboe <axboe@kernel.dk>
Thu, 27 Aug 2020 00:58:26 +0000 (18:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:41 +0000 (11:29 +0200)
commit1506fdcde864b57d7761656a5d8a7142c829f3b8
tree336bf99699351055415e75277381dcee0454eb59
parent116790cfa0b8b8ae801d282166059691b33c965a
io_uring: clear req->result on IOPOLL re-issue

commit 56450c20fe10d4d93f58019109aa4e06fc0b9206 upstream.

Make sure we clear req->result, which was set to -EAGAIN for retry
purposes, when moving it to the reissue list. Otherwise we can end up
retrying a request more than once, which leads to weird results in
the io-wq handling (and other spots).

Cc: stable@vger.kernel.org
Reported-by: Andres Freund <andres@anarazel.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c