io_uring: fix racy IOPOLL completions
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 6 Dec 2020 22:22:43 +0000 (22:22 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Dec 2020 19:04:01 +0000 (12:04 -0700)
commit31bff9a51b264df6d144931a6a5f1d6cc815ed4b
treeea24ea7493c5b4b97bea3e8b5730743a785cf4de
parentdad1b1242fd5717af18ae4ac9d12b9f65849e13a
io_uring: fix racy IOPOLL completions

IOPOLL allows buffer remove/provide requests, but they doesn't
synchronise by rules of IOPOLL, namely it have to hold uring_lock.

Cc: <stable@vger.kernel.org> # 5.7+
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c