From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH 05/18] Add io_uring IO interface Date: Mon, 04 Feb 2019 18:52:35 -0500 Message-ID: References: <20190201152414.23296-1-axboe@kernel.dk> <20190201152414.23296-6-axboe@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Jeff Moyer's message of "Mon, 04 Feb 2019 18:22:48 -0500") Sender: owner-linux-aio@kvack.org To: Jens Axboe Cc: linux-aio@kvack.org, linux-block@vger.kernel.org, linux-api@vger.kernel.org, hch@lst.de, avi@scylladb.com, jannh@google.com List-Id: linux-api@vger.kernel.org Jeff Moyer writes: > Hi, Jens, > > Jens Axboe 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 -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org