Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/tctx: check for setup tctx->io_wq before teardown

As with the idling code before it, the error exit path should check for
a NULL tctx->io_wq before calling io_wq_put_and_exit().

Fixes: 7880174e1e5e ("io_uring/tctx: clean up __io_uring_add_tctx_node() error handling")
Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Clément Léger <cleger@meta.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

+2 -1
+2 -1
io_uring/tctx.c
··· 171 171 } 172 172 if (!current->io_uring) { 173 173 err_free: 174 - io_wq_put_and_exit(tctx->io_wq); 174 + if (tctx->io_wq) 175 + io_wq_put_and_exit(tctx->io_wq); 175 176 percpu_counter_destroy(&tctx->inflight); 176 177 kfree(tctx); 177 178 }