io_uring: fix double io_uring free
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 21 Dec 2020 18:34:05 +0000 (18:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:54:04 +0000 (11:54 +0100)
commit5998fe548db9496ad0d151148ff1c6dbe1e0dacc
tree1284f49fec77157a7e1ceedc433fc1f99375f229
parent9f8ebecc86a42a1ec9cd8646c752c772e7ee3bde
io_uring: fix double io_uring free

commit 9faadcc8abe4b83d0263216dc3a6321d5bbd616b upstream.

Once we created a file for current context during setup, we should not
call io_ring_ctx_wait_and_kill() directly as it'll be done by fput(file)

Cc: stable@vger.kernel.org # 5.10
Reported-by: syzbot+c9937dfb2303a5f18640@syzkaller.appspotmail.com
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
[axboe: fix unused 'ret' for !CONFIG_UNIX]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c