io_uring: synchronise IOPOLL on task_submit fail
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 12 Jan 2021 21:17:24 +0000 (21:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:16:52 +0000 (14:16 +0100)
commit1d5e50da5cc7483849b815ee34559be4f3902a3b
tree1125f45ebda4a7bbf54e72548b5a5f06f7c03b80
parentbca9ca5a603f6c5586a7dfd35e06abe6d5fcd559
io_uring: synchronise IOPOLL on task_submit fail

commit 81b6d05ccad4f3d8a9dfb091fb46ad6978ee40e4 upstream

io_req_task_submit() might be called for IOPOLL, do the fail path under
uring_lock to comply with IOPOLL synchronisation based solely on it.

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