Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
The backport causes reference loss on an lnet_peer_ni if its parent peer has the LNET_PEER_LOCK_PRIMARY bit set:
diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 7a438ea086..01eb9aa8aa 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -546,6 +546,15 @@ lnet_peer_del_nid(struct lnet_peer *lp, lnet_nid_t nid4, unsigned int flags) } lpni = lnet_peer_ni_find_locked(&nid); + /* If we're asked to lock down the primary NID we shouldn't be + * deleting it + */ + if (lp->lp_state & LNET_PEER_LOCK_PRIMARY && + nid_same(&primary_nid, &nid)) { + rc = -EPERM; + goto out; <<< Ref taken by lnet_peer_ni_find_locked() is not dropped + } + if (!lpni) { rc = -ENOENT; goto out;
"Chris Horn <chris.horn@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/57977
Subject: LU-18697 lnet: lnet_peer_del_nid refcount loss
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 35796518cf3cc1e7ca05b007228634ae546cf631