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 46fee9a commit 362a9e6Copy full SHA for 362a9e6
fs/io_uring.c
@@ -7905,15 +7905,19 @@ static struct io_wq *io_init_wq_offload(struct io_ring_ctx *ctx,
7905
struct io_wq_data data;
7906
unsigned int concurrency;
7907
7908
+ mutex_lock(&ctx->uring_lock);
7909
hash = ctx->hash_map;
7910
if (!hash) {
7911
hash = kzalloc(sizeof(*hash), GFP_KERNEL);
- if (!hash)
7912
+ if (!hash) {
7913
+ mutex_unlock(&ctx->uring_lock);
7914
return ERR_PTR(-ENOMEM);
7915
+ }
7916
refcount_set(&hash->refs, 1);
7917
init_waitqueue_head(&hash->wait);
7918
ctx->hash_map = hash;
7919
}
7920
7921
7922
data.hash = hash;
7923
data.task = task;
0 commit comments