mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 00:29:36 -04:00
staging/lustre/lnet: fix potential null pointer dereference
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: Oleg Drokin <oleg.drokin@intel.com> CC: Dmitry Eremin <dmitry.eremin@intel.com> CC: Liang Zhen <liang.zhen@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
109dae8dab
commit
d36175e9d2
@@ -145,7 +145,7 @@ lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
|
||||
* NB individual events can be missed; the only guarantee is that you
|
||||
* always get the most recent news */
|
||||
|
||||
if (lp->lp_notifying)
|
||||
if (lp->lp_notifying || ni == NULL)
|
||||
return;
|
||||
|
||||
lp->lp_notifying = 1;
|
||||
|
||||
Reference in New Issue
Block a user