]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
io_uring: fortify tctx/io_wq cleanup
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 20 May 2021 12:21:20 +0000 (13:21 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 May 2021 13:29:11 +0000 (07:29 -0600)
commitba5ef6dc8a827a904794210a227cdb94828e8ae7
tree1c985bd07f6c61cfe7be947fe2325dd6f880a40a
parent7a274727702cc07d27cdebd36d1d5132abeea12f
io_uring: fortify tctx/io_wq cleanup

We don't want anyone poking into tctx->io_wq awhile it's being destroyed
by io_wq_put_and_exit(), and even though it shouldn't even happen, if
buggy would be preferable to get a NULL-deref instead of subtle delayed
failure or UAF.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/827b021de17926fd807610b3e53a5a5fa8530856.1621513214.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c