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 <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
1d5f360dd1
commit
ef8eaa4e65
@ -7843,6 +7843,8 @@ void __io_uring_free(struct task_struct *tsk)
|
|||||||
struct io_uring_task *tctx = tsk->io_uring;
|
struct io_uring_task *tctx = tsk->io_uring;
|
||||||
|
|
||||||
WARN_ON_ONCE(!xa_empty(&tctx->xa));
|
WARN_ON_ONCE(!xa_empty(&tctx->xa));
|
||||||
|
WARN_ON_ONCE(tctx->io_wq);
|
||||||
|
|
||||||
percpu_counter_destroy(&tctx->inflight);
|
percpu_counter_destroy(&tctx->inflight);
|
||||||
kfree(tctx);
|
kfree(tctx);
|
||||||
tsk->io_uring = NULL;
|
tsk->io_uring = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user