Commit ef8eaa4e authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1d5f360d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;