]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
staging: lustre: fix crash due to NULL networks string
authorAmir Shehata <amir.shehata@intel.com>
Mon, 22 Feb 2016 22:29:04 +0000 (17:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2016 02:05:49 +0000 (18:05 -0800)
commit8766cd12e41539cfe97025adbe2ef45ffe0e0bc2
treec75d853da565a93022063c381f4b7463a358f467
parent2e9a51bdb29edba57bfa9f674adf46044529740b
staging: lustre: 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>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5540
Reviewed-on: http://review.whamcloud.com/11626
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/api-ni.c
drivers/staging/lustre/lnet/lnet/config.c