From: Jeff Moyer Subject: Re: [patch] io_uring: don't allow duplicate registrations Date: Wed, 16 Jan 2019 20:31:30 -0500 Message-ID: References: <9965e26b-1490-7a18-e112-0d2318b8b23f@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-block@vger.kernel.org To: Jens Axboe Return-path: In-Reply-To: <9965e26b-1490-7a18-e112-0d2318b8b23f@kernel.dk> (Jens Axboe's message of "Wed, 16 Jan 2019 18:23:16 -0700") Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org Jens Axboe writes: > 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. Sounds good. > I also added -EINVAL for unregister when not already setup. Yep, I saw that. -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