Jeff Moyer <[email protected]> writes:

> Hi, Jens,
>
> Jens Axboe <[email protected]> writes:
>
>> +static void io_ring_ctx_free(struct io_ring_ctx *ctx)
>> +{
>> +    destroy_workqueue(ctx->sqo_wq);
>
> You need to make sure sqo_wq is non-null before calling
> destroy_workqueue.

You also need to check for non-null sqo_files and sqo_mm.

Basically, you're tearing things down twice if setup of the context
fails in some way.

-Jeff

Reply via email to