[PATCH 5/5] staging/lustre/lnet: fix potential null pointer dereference

2014-04-27 Thread Oleg Drokin
From: Dmitry Eremin dmitry.ere...@intel.com Pointer 'ni' checked for NULL at line 1569 may be passed to function and may be dereferenced there by passing argument 1 to function 'lnet_ni_notify_locked' at line 1621. found by Klocwork Insight tool Signed-off-by: Dmitry Eremin

Re: [PATCH 5/5] staging/lustre/lnet: fix potential null pointer dereference

2014-04-27 Thread Greg Kroah-Hartman
On Sun, Apr 27, 2014 at 05:17:26PM -0400, Oleg Drokin wrote: From: Dmitry Eremin dmitry.ere...@intel.com Pointer 'ni' checked for NULL at line 1569 may be passed to function and may be dereferenced there by passing argument 1 to function 'lnet_ni_notify_locked' at line 1621. found by

Re: [PATCH 5/5] staging/lustre/lnet: fix potential null pointer dereference

2014-04-27 Thread Oleg Drokin
Hello! On Apr 27, 2014, at 6:39 PM, Greg Kroah-Hartman wrote: -lnet_ni_notify_locked(ni, lp); +if (ni != NULL) +lnet_ni_notify_locked(ni, lp); Why can't lnet_ni_notify_locked() accept NULL as an input? It makes no sense, because then there is nowhere to send the