From: Chris Horn Date: Wed, 5 Aug 2020 16:19:35 +0000 (-0500) Subject: LU-15039 lnet: Fix reference leak in lnet_parse X-Git-Tag: 2.14.56~158 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=e69eca08bce47bf85b3c011598e360a2468019b5;p=fs%2Flustre-release.git LU-15039 lnet: Fix reference leak in lnet_parse We need to drop the reference taken by lnet_nid2peerni_locked() if we determine that we need to drop the message because of asymmetric route. Test-Parameters: trivial HPE-bug-id: LUS-9186 Fixes: 955080c3ae ("LU-13779 lnet: Correct asymmetric route detection") Signed-off-by: Chris Horn Change-Id: I799c9522b1ce5f4caffc5848a829995e5b5484e7 Reviewed-on: https://review.whamcloud.com/45067 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Serguei Smirnov Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index 6117ccb..3b07768 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -4703,6 +4703,8 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, lnet_nid_t from_nid, } } if (lnet_drop_asym_route && for_me && !found) { + /* Drop ref taken by lnet_nid2peerni_locked() */ + lnet_peer_ni_decref_locked(lpni); lnet_net_unlock(cpt); /* we would not use from_nid to route a message to * src_nid