Whamcloud - gitweb
LU-9909 lnet: fix memory leak and lnet_interfaces_max 02/28702/2
authorAmir Shehata <amir.shehata@intel.com>
Fri, 25 Aug 2017 01:06:57 +0000 (18:06 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 31 Aug 2017 19:17:14 +0000 (19:17 +0000)
commit81d4f7a253193ebfe559f675d3c0975c0899d592
treec2958c89cc7710d30a959d4be2a51d60595e0193
parentbb4c3bc38eeeeec111c14c024669465addb30c70
LU-9909 lnet: fix memory leak and lnet_interfaces_max

Free buffer allocated for discover command.

Set lnet_interfaces_max to LNET_INTERFACES_MAX_DEFAULT if
it's not defined or if it's being set to something below
LNET_INTERFACES_MIN.

For lnet_ping() and lnet_discover() if the provided space
can fit more NIDs than lnet_interfaces_max then ensure only
lnet_interfaces_max is copied into the buffer.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I19aed712f40a8bf44d2fb112588e9ae07257469f
Reviewed-on: https://review.whamcloud.com/28702
Tested-by: Jenkins
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/lnet/api-ni.c