[CHECKER] null ptr checking

From: Wallace Huang (whuang@Stanford.EDU)
Date: Fri Aug 11 2000 - 22:21:44 EST


Hi Everyone,

I'm Wallace, another member of Dawson's group, and I've been working on a
checker that make sure folks check return values from allocation functions
for NULL before using. I believe Dawson sent out a log with respect to
just kmalloc/vmalloc; I've expanded it to include others.

Right now, we're just using the obvious "if it's named alloc" heuristic to
find new functions, but if any of you are aware of other ones that don't
fall in this category, please let me know.

There are a few false positives. Some are due to kprintf's and the like,
and this has already been fixed. The rest involve freeing on error paths,
which I'll also fix shortly.

We're working on identifying more functions that can return NULL pointers,
as well as coupling alloc's with their respective free's. Again, if you
have any heurstics about identifying such pairings, I would appreciate
your input.

-Wallace



-
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/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:26 EST