Quantcast
Channel: lkml.org : Pallipadi, Venkatesh
Viewing all articles
Browse latest Browse all 864

Re: semantics of rhashtable and sysvipc

$
0
0
Linus Torvalds writes: (Summary) But no, not with a BUG_ON().
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.
to handle the allocation failure.
I refuse to see more of the shit-for-brains kind of "I can't be bothered to handle error cases" BUG_ON() stuff.
handle error cases" BUG_ON() stuff.
And I also am not in the least interested in "this cannot possibly happen" BUG_ON() code.
BUG_ON() code.
One option is to make rhashtable_alloc() shrink the allocation and try again if it fails, and then you *can* do __GFP_NOFAIL eventually.

Viewing all articles
Browse latest Browse all 864

Trending Articles