Messages in this thread | | | Subject | Re: Many unchecked calls to kmalloc() in Linux 2.2.11 | Date | Fri, 13 Aug 1999 23:58:34 +0100 (BST) | From | Alan Cox <> |
| |
> Searching through the new Linux 2.2.11 source tree with a lint script, I > have found 166 possibly crash-worthy bugs. These are places where a > developer has called a function that can return NULL, but has forgotten to > check for a NULL return value. For example, many developers call kmalloc(), > __get_free_pages(), or ioremap() without checking for NULL, assuming these > functions will always succeed. Although these functions rarely return NULL, > this is still a real possibility for a heavily stressed Linux server. If we > want Linux to become even more reliable, we need to stamp out bugs in every > corner of the source code.
There is no point handling the cases you cant get out of. If you look at the kernel you will see a lot of cases where we dont check stuff because a) it cant actually fail in the real world during init time b) if it did we couldnt recover anyway so its better to oops
Quite a few pieces of code are in that category - by no means all it shows up.
Also btw scripts/* isnt part of the kernel and fs/proc/omirr isnt compiled into anything.
Most of those are real errors in the "incorrect but cant happen" category not just init however.
Thanks
Alan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |