On 2/4/19 4:52 PM, Jeff Moyer wrote: > Jeff Moyer <jmoyer@xxxxxxxxxx> writes: > >> Hi, Jens, >> >> Jens Axboe <axboe@xxxxxxxxx> 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. Also fixed, thanks! -- Jens Axboe