]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: drop req submit reference always in async punt
authorJens Axboe <axboe@kernel.dk>
Tue, 30 Apr 2019 20:44:05 +0000 (14:44 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 May 2019 14:38:47 +0000 (08:38 -0600)
commitc003f7e18e20b2e8a99ebb0cd12bc2fd0ab346c7
tree6f5f784693b79fcfd0fa6a5c39e7a6d8d16a5137
parent7cad6f78a85dbe7bd2f066d02f8da7c138fa57d9
io_uring: drop req submit reference always in async punt

If we don't end up actually calling submit in io_sq_wq_submit_work(),
we still need to drop the submit reference to the request. If we
don't, then we can leak the request. This can happen if we race
with ring shutdown while flushing the workqueue for requests that
require use of the mm_struct.

Fixes: 14e0091c16de ("io_uring: use regular request ref counts")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c