[CHECKER] null ptr checking

From: Wallace Huang (whuang@Stanford.EDU)
Date: Sat Aug 12 2000 - 03:48:45 EST


sorry, first one bounced. The log is now t-gz'd.

----- Forwarded message from Wallace Huang <whuang@Stanford.EDU> -----

From: Wallace Huang <whuang@Stanford.EDU>
Date: Fri, 11 Aug 2000 20:21:44 -0700
To: linux-kernel@vger.rutgers.edu
Cc: mc@CS.Stanford.EDU
Subject: [CHECKER] null ptr checking
Mail-Followup-To: linux-kernel@vger.rutgers.edu, mc@cs.stanford.edu
X-Mailer: Mutt 1.0i
X-UIDL: cebe2d4f4fbd05b5e1297d0403073f3f

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:27 EST