Whamcloud - gitweb
LU-19072 lnet: don't crash if ni_status is NULL 82/59482/2
authorTimothy Day <timday@amazon.com>
Thu, 29 May 2025 18:36:16 +0000 (18:36 +0000)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Jun 2025 06:37:03 +0000 (06:37 +0000)
commit7aba5126752c5734eae7de5363ad914aecd064d4
treecf1be8ac28236c6acf42c9d612a0c61d861e52d4
parent24a2a4ed6b2120aa21cbaad9496281ff69d1d7c2
LU-19072 lnet: don't crash if ni_status is NULL

When reading LNet tunables, ni_status can be NULL. This
triggers an LASSERT() rather than gracefully handling it.
Instead, don't crash. Remove the LASSERT().

lnet_ni_get_status_locked() already handles a NULL ni_status.
While it's questionable whether ni_status == NULL should be
LNET_NI_STATUS_UP or LNET_NI_STATUS_DOWN, it definitely
should not crash.

Also, use lnet_ni_get_status() instead of
lnet_ni_get_status_locked().

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I1d8ba9b5f6478d2a915ac6c7f33c22d1742c43d0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59482
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/lnet/lnet_debugfs.c