Re: [Cocci] [PATCH] staging/rdma/hfi1: Fix a possible null pointer dereference

2015-12-20 Thread Julia Lawall
Here is my proposition for finding missing NULL tests. I tried to limit it to generic kmalloc like functions. There are of course many other NULL returning functions, but maybe they could be in an other rule, julia --- /// Look for kmalloc etc that are not followed by a NULL check. //# May

Re: [Cocci] [PATCH] staging/rdma/hfi1: Fix a possible null pointer dereference

2015-12-17 Thread Julia Lawall
On Mon, 14 Dec 2015, Nicholas Mc Guire wrote: > On Thu, Dec 10, 2015 at 11:13:38AM -0500, Mike Marciniszyn wrote: > > From: Easwar Hariharan > > > > A code inspection pointed out that kmalloc_array may return NULL and > > memset doesn't check the input pointer for