From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jann Horn Subject: Re: [PATCH 05/18] Add io_uring IO interface Date: Tue, 29 Jan 2019 01:34:34 +0100 Message-ID: References: <20190128213538.13486-1-axboe@kernel.dk> <20190128213538.13486-6-axboe@kernel.dk> <51c759f4-7ce5-182b-98e8-2c0e99ca4f9a@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <51c759f4-7ce5-182b-98e8-2c0e99ca4f9a@kernel.dk> Sender: owner-linux-aio@kvack.org To: Jens Axboe Cc: Al Viro , linux-aio@kvack.org, linux-block@vger.kernel.org, linux-man , Linux API , hch@lst.de, jmoyer@redhat.com, Avi Kivity List-Id: linux-man@vger.kernel.org On Tue, Jan 29, 2019 at 1:32 AM Jens Axboe wrote: > On 1/28/19 5:03 PM, Jens Axboe wrote: > >> But you only do that teardown on ->release, right? And ->release > >> doesn't have much to do with the process lifetime. > > > > Yes, only on ->relase(). > > OK, so I reworked the files struct to just grab it, then we ensure that > doesn't go away. For mm, it's a bit more tricky. I think the best > solution here is to add a fops->flush() and check for the process > exiting its files. If it does, we quiesce the async contexts and prevent > further use of that mm. We can't just keep holding a reference to the mm > like we do with the files. > > That should solve both cases. You still have to hold a reference on the mm though, I think (for example, because two tasks might be sharing the fd table without sharing the mm). -- 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