From: Pavel Begunkov Date: Sat, 27 Feb 2021 11:16:45 +0000 (+0000) Subject: io_uring: warn on not destroyed io-wq X-Git-Tag: v5.12-rc2~6^2~29 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ef8eaa4e65facb1f51a64dbb4f5500134622c67c;p=linux-platform-drivers-x86.git io_uring: warn on not destroyed io-wq Make sure that we killed an io-wq by the time a task is dead. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 83973f6b3c0a..796b6d1f72f9 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7843,6 +7843,8 @@ void __io_uring_free(struct task_struct *tsk) struct io_uring_task *tctx = tsk->io_uring; WARN_ON_ONCE(!xa_empty(&tctx->xa)); + WARN_ON_ONCE(tctx->io_wq); + percpu_counter_destroy(&tctx->inflight); kfree(tctx); tsk->io_uring = NULL;