|
|
Subscribe / Log in / New account

Error recovery (was: The "too small to fail" memory-allocation rule)

Error recovery (was: The "too small to fail" memory-allocation rule)

Posted Dec 24, 2014 21:07 UTC (Wed) by agrover (guest, #55381)
In reply to: Error recovery (was: The "too small to fail" memory-allocation rule) by jezuch
Parent article: The "too small to fail" memory-allocation rule

We've all been writing, reviewing, and debugging error-handling code in the kernel, hundreds of programmer-years of effort. It's a little insulting that it doesn't even get used. Seems to me the sooner we pull off the band-aid and enable all allocations to fail, the better.

If there are bugs that are "too scary" to contemplate fixing the right way, then we are all in BIG trouble.


to post comments

Error recovery (was: The "too small to fail" memory-allocation rule)

Posted Dec 25, 2014 22:28 UTC (Thu) by epa (subscriber, #39769) [Link]

The terminology used is unfortunate. It is not that small allocations "cannot fail". Of course if the memory is unavailable, any memory allocation will fail. The question is what failure mode happens. Is it by a false status being returned to the caller, or is it some other kind of failure such as a kernel panic or hard lockup?


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds