We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fa6588 commit 3a87e26Copy full SHA for 3a87e26
io_uring/io_uring.c
@@ -321,7 +321,7 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)
321
sizeof(struct io_kiocb));
322
ret |= io_futex_cache_init(ctx);
323
if (ret)
324
- goto err;
+ goto free_ref;
325
init_completion(&ctx->ref_comp);
326
xa_init_flags(&ctx->personalities, XA_FLAGS_ALLOC1);
327
mutex_init(&ctx->uring_lock);
@@ -349,6 +349,9 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)
349
io_napi_init(ctx);
350
351
return ctx;
352
+
353
+free_ref:
354
+ percpu_ref_exit(&ctx->refs);
355
err:
356
io_alloc_cache_free(&ctx->rsrc_node_cache, kfree);
357
io_alloc_cache_free(&ctx->apoll_cache, kfree);
0 commit comments