From: Chris Horn Date: Mon, 4 Dec 2023 21:14:53 +0000 (-0600) Subject: LU-10391 lnet: Ping target corrupted X-Git-Tag: 2.15.60~45 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1b099c404ae4780179bbcd0622fac255edf40352;p=fs%2Flustre-release.git 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 --- 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);