Whamcloud - gitweb
LU-18697 lnet: lnet_peer_del_nid refcount loss 77/57977/3
authorChris Horn <chris.horn@hpe.com>
Tue, 4 Feb 2025 16:37:01 +0000 (09:37 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 May 2025 03:42:43 +0000 (03:42 +0000)
commitc00bb50624a3eedad16759075cebeedf17030ba4
tree4fb308e609c06abbb62e02e2a9f083e800a16378
parentc2d257dfa4505ab45324daad2ca08ddc0d8977c0
LU-18697 lnet: lnet_peer_del_nid refcount loss

This is a regression introduced in the b2_15 port of

Lustre-change: https://review.whamcloud.com/50106
Lustre-commit: aacb16191a72bc6db1155030849efb0d6971a572

In lnet_peer_del_nid(), the call to lnet_peer_ni_find_locked() takes
a reference on the lnet_peer_ni, but this reference is not dropped
if the peer state has LNET_PEER_LOCK_PRIMARY bit set and the nid
being deleted is the primary NID of the peer.

A test case is added to exercise this code path.

HPE-bug-id: LUS-12709
Fixes: c9badd8648 ("LU-14668 lnet: Lock primary NID logic")
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ib717672189824e61a184ddcb9127d2921f2a66db
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57977
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/peer.c
lustre/tests/sanity-lnet.sh