From: Jens Axboe Subject: Re: [patch] io_uring: don't allow duplicate registrations Date: Wed, 16 Jan 2019 18:23:16 -0700 Message-ID: <9965e26b-1490-7a18-e112-0d2318b8b23f@kernel.dk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-block@vger.kernel.org To: Jeff Moyer Return-path: In-Reply-To: Content-Language: en-US Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org On 1/16/19 5:50 PM, Jeff Moyer wrote: > Hi, Jens, > > It looks to me like calling io_uring_register more than once (for either > IORING_REGISTER_BUFFERS or IORING_REGISTER_FILES) will leak the > references taken in previous calls. Oops, thanks for that. Let's make it -EBUSY though, everything ends up being -EINVAL and that sometimes makes it hard for an application to figure out wtf is going on. I also added -EINVAL for unregister when not already setup. -- Jens Axboe -- 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