From bd7d65bf7a868d914484e43f7fbcb0b42d7d9e25 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. Lustre-change: https://review.whamcloud.com/46711 Lustre-commit: 4fbd0705a3d25bbc85e953f81e697e5006b215ce 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 Signed-off-by: Olaf Faaland Change-Id: Ic403619c6dccf3921c46a674808c404adad7a30e Reviewed-by: Cyril Bordage Reviewed-by: Andriy Skulysh Reviewed-by: Serguei Smirnov Reviewed-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49259 Tested-by: jenkins Tested-by: Maloo --- 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 61dcc85..ae42e35 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -4712,7 +4712,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