Re: semantics of rhashtable and sysvipc

From: Davidlohr Bueso
Date: Wed May 23 2018 - 13:54:21 EST


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.