From 4fbd0705a3d25bbc85e953f81e697e5006b215ce Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Thu, 3 Mar 2022 01:12:32 -0600 Subject: [PATCH] LU-15618 lnet: Return ESHUTDOWN in lnet_parse() If the peer NI lookup in lnet_parse() fails with ESHUTDOWN then we should return that value back to the LNDs so that they can treat the failed call the same way as other lnet_parse() failures. Returning zero results in at least one bug in socklnd where a reference on a ksock_conn can be leaked which prevents socklnd from shutting down. Fixes: 47b7b31978 ("LU-8106 lnet: Do not drop message when shutting down LNet") Test-Parameters: trivial testlist=sanity-lnet HPE-bug-id: LUS-15794 Signed-off-by: Chris Horn Change-Id: Ic403619c6dccf3921c46a674808c404adad7a30e Reviewed-on: https://review.whamcloud.com/46711 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Cyril Bordage Reviewed-by: Andriy Skulysh Reviewed-by: Serguei Smirnov Reviewed-by: Oleg Drokin --- lnet/lnet/lib-move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index e0ddf42..6a3220a 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -4693,7 +4693,7 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, lnet_msg_free(msg); if (rc == -ESHUTDOWN) /* We are shutting down. Don't do anything more */ - return 0; + return rc; goto drop; } -- 1.8.3.1