X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=io_uring%2Fio-wq.c;h=411bb2d1acd452f6bb1af070dd338fd57fb6d3f7;hb=refs%2Fheads%2Ftizen-6.1.y;hp=6f1d0e5df23ad815479904639282bf7a8b4b3b33;hpb=e5f3ec38c8496dd7f6ada8a5e8d4958ef46ddb3f;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 6f1d0e5..411bb2d 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -1230,6 +1230,12 @@ static void io_wq_cancel_tw_create(struct io_wq *wq) worker = container_of(cb, struct io_worker, create_work); io_worker_cancel_cb(worker); + /* + * Only the worker continuation helper has worker allocated and + * hence needs freeing. + */ + if (cb->func == create_worker_cont) + kfree(worker); } }