From 1b099c404ae4780179bbcd0622fac255edf40352 Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Mon, 4 Dec 2023 15:14:53 -0600 Subject: [PATCH] LU-10391 lnet: Ping target corrupted If NIs with large NIDs are added then the discovery ping target can become corrupted. This is due to a typo in len_ping_target_install_locked(). Instead of writing the NI status to the lnet_ni_large_status::ns_status field, we were instead writing the status value 8 bytes into the lnet_ni_large_status (ns_status is offset 8 into lnet_ni_status). This overwrites some of the struct lnet_nid. Test-Parameters: trivial Fixes: db0fb8f ("LU-10391 lnet: allow ping packet to contain large nids") Signed-off-by: Chris Horn Change-Id: I7ccff7ae59feac5edc6a97a86c861ffbdb0bb333 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53320 Reviewed-by: James Simmons Reviewed-by: Serguei Smirnov Reviewed-by: Neil Brown Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 99d38b0..4185a90 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -2073,7 +2073,7 @@ lnet_ping_target_install_locked(struct lnet_ping_buffer *pbuf) lns->ns_nid = ni->ni_nid; lnet_ni_lock(ni); - ns->ns_status = lnet_ni_get_status_locked(ni); + lns->ns_status = lnet_ni_get_status_locked(ni); ni->ni_status = &lns->ns_status; lnet_ni_unlock(ni); -- 1.8.3.1