From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davidlohr Bueso Subject: Re: semantics of rhashtable and sysvipc Date: Wed, 23 May 2018 11:31:03 -0700 Message-ID: <20180523183103.cdgv4slom62y56wi@linux-n805> References: <20180523172500.anfvmjtumww65ief@linux-n805> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: Thomas Graf , Herbert Xu , Andrew Morton , Manfred Spraul , guillaume.knispel@supersonicimagine.com, Linux API , Linux Kernel Mailing List List-Id: linux-api@vger.kernel.org On Wed, 23 May 2018, Linus Torvalds wrote: >So I'm perfectly fine with getting rid of 'tables_initialized'. But no, not >with a BUG_ON(). > >If you cannot guarantee that the allocation works (using __GFP_NOFAIL is >ok, for example - but it only works with small allocations), then you need >to handle the allocation failure. Note that even if the allocation was guaranteed, there are still param validations and rhashtable_init() can return -EINVAL.