lkml.org 
[lkml]   [1999]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Many unchecked calls to kmalloc() in Linux 2.2.11
Date
From
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.087 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site