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. -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html