staging: lustre: lnet: Don't access NULL NI on failure path
authorDoug Oucharek <doug.s.oucharek@intel.com>
Thu, 9 Jun 2016 22:45:45 +0000 (18:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2016 01:33:27 +0000 (18:33 -0700)
commita9cc4006155a68dd0940728f4f222dd035180904
treeb998a983f32cd735f546673bb37b66d0315e6453
parent03cce00b4b0d70885c7a63ef17713b8cc2b1c8bd
staging: lustre: lnet: Don't access NULL NI on failure path

In kiblnd_passive_connect(), if we are failing the connection
attempt because we cannot find a valid NI (we have a NULL NI),
we were coring after the "goto fail" because the failure
path was assuming non-NULL NI.

This patch ensures we don't dereference a NULL NI on that
failure path.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8022
Reviewed-on: http://review.whamcloud.com/19614
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Matt Ezell <ezellma@ornl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c