Whamcloud - gitweb
LU-5540 lnet: fix crash due to NULL networks string 26/11626/5
authorAmir Shehata <amir.shehata@intel.com>
Wed, 27 Aug 2014 23:21:11 +0000 (16:21 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Sep 2014 00:26:18 +0000 (00:26 +0000)
commitceccfb7d820829b76639b0789b0e12581e5b8019
tree4b81d7488f0c73e7871e8a2e7543a8d3df107286
parent37807874074d8f9451fea93db4419863fa1fe56f
LU-5540 lnet: fix crash due to NULL networks string

If there is an invalid networks or ip2nets lnet_parse_networks()
gets called with a NULL 'network' string parameter

lnet_parse_networks() needs to sanitize its input string now that
it's being called from multiple places.  Instead, check for
a NULL string everytime the function is called, which reduces the
probability of errors with other code modifications.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ifcc1f6f74a3e0e804cb65e3d1b83f85a24f44d9b
Reviewed-on: http://review.whamcloud.com/11626
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/lnet/api-ni.c
lnet/lnet/config.c