]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: ensure io-wq context is always destroyed for tasks
authorJens Axboe <axboe@kernel.dk>
Tue, 23 Feb 2021 19:27:49 +0000 (12:27 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Feb 2021 03:33:36 +0000 (20:33 -0700)
commitaa997a7266134f665f2dc41cc6d22300abd42d50
tree0a734ed2b33e2e08295b5a0793bb20d72a32ad0f
parent38eb02dd457508c502b8fc0bc3ed2fe59834aec2
io_uring: ensure io-wq context is always destroyed for tasks

If the task ends up doing no IO, the context list is empty and we don't
call into __io_uring_files_cancel() when the task exits. This can cause
a leak of the io-wq structures.

Ensure we always call __io_uring_files_cancel(), even if the task
context list is empty.

Fixes: b7b8cb402d34 ("io_uring: tie async worker side to the task context")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/linux/io_uring.h