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 g

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

2015-12-18 Thread Nicholas Mc Guire
On Fri, Dec 18, 2015 at 07:33:36AM +0100, Julia Lawall wrote: > > > 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 an

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 NULL, resulting in a possible

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

2015-12-14 Thread Nicholas Mc Guire
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 NULL, resulting in a possible > NULL dereference. This patch fixes this. > > Reviewed-b

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

2015-12-10 Thread Mike Marciniszyn
From: Easwar Hariharan A code inspection pointed out that kmalloc_array may return NULL and memset doesn't check the input pointer for NULL, resulting in a possible NULL dereference. This patch fixes this. Reviewed-by: Mike Marciniszyn Signed-off-by: Easwar Hariharan --- drivers/staging/rdma/