Whamcloud - gitweb
LU-6501 libcfs: removal last entry of libcfs_netstrfns[] 24/15424/8
authorFrederic Saunier <frederic.saunier@atos.net>
Tue, 21 Jul 2015 19:04:51 +0000 (15:04 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 25 Jul 2015 03:10:16 +0000 (03:10 +0000)
commit5628f0cb3fd2960f4a5effdf9b9d7b4bd9357713
treeb83c6407b8c0a443071d6abfb0622b2789ace390
parent306a24df1ca423a17fe92ef2e93008b759075ed7
LU-6501 libcfs: removal last entry of libcfs_netstrfns[]

Currently NID string handling test for the last entry,
and last entry has .nf_type == (__u32) -1. If we ask
for a non existent LND we hit the last entry which then
calls a strlen on a NULL which causes a error. We can
avoid this problem if we just remove the last entry
since it is not used for anything except as a last
entry marker.

Signed-off-by: Frederic Saunier <frederic.saunier@atos.net>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: Ia8e3bea0f01bb5fa78e88bfbca698b0aa0d148ea
Reviewed-on: http://review.whamcloud.com/15424
Tested-by: Jenkins
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/libcfs/util/nidstrings.c
lnet/lnet/nidstrings.c