summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-02-27 12:16:45 +0100
committerJens Axboe <axboe@kernel.dk>2021-03-04 14:35:00 +0100
commitef8eaa4e65facb1f51a64dbb4f5500134622c67c (patch)
treec6225b052450c0df1ca5226df2f6802b212337fb /fs
parentio_uring: fix race condition in task_work add and clear (diff)
downloadlinux-ef8eaa4e65facb1f51a64dbb4f5500134622c67c.tar.xz
linux-ef8eaa4e65facb1f51a64dbb4f5500134622c67c.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c2
1 files changed, 2 insertions, 0 deletions
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;