Whamcloud - gitweb
LU-15039 lnet: Fix reference leak in lnet_parse 67/45067/2
authorChris Horn <chris.horn@hpe.com>
Wed, 5 Aug 2020 16:19:35 +0000 (11:19 -0500)
committerOleg Drokin <green@whamcloud.com>
Sun, 17 Oct 2021 18:11:43 +0000 (18:11 +0000)
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 <chris.horn@hpe.com>
Change-Id: I799c9522b1ce5f4caffc5848a829995e5b5484e7
Reviewed-on: https://review.whamcloud.com/45067
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c

index 6117ccb..3b07768 100644 (file)
@@ -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) {
                        }
                }
                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
                        lnet_net_unlock(cpt);
                        /* we would not use from_nid to route a message to
                         * src_nid