From: Chris Horn <chris.horn@xxxxxxx> 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: e426f0d24e ("staging: lustre: lnet: Do not drop message when shutting down LNet") HPE-bug-id: LUS-15794 WC-bug-id: https://jira.whamcloud.com/browse/LU-15618 Lustre-commit: 4fbd0705a3d25bbc8 ("LU-15618 lnet: Return ESHUTDOWN in lnet_parse()") Signed-off-by: Chris Horn <chris.horn@xxxxxxx> Reviewed-on: https://review.whamcloud.com/46711 Reviewed-by: Cyril Bordage <cbordage@xxxxxxxxxxxxx> Reviewed-by: Andriy Skulysh <andriy.skulysh@xxxxxxx> Reviewed-by: Serguei Smirnov <ssmirnov@xxxxxxxxxxxxx> Reviewed-by: Oleg Drokin <green@xxxxxxxxxxxxx> Signed-off-by: James Simmons <jsimmons@xxxxxxxxxxxxx> --- net/lnet/lnet/lib-move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/lnet/lnet/lib-move.c b/net/lnet/lnet/lib-move.c index 9ee1075..0c5bf82 100644 --- a/net/lnet/lnet/lib-move.c +++ b/net/lnet/lnet/lib-move.c @@ -4425,7 +4425,7 @@ void lnet_monitor_thr_stop(void) kfree(msg); if (rc == -ESHUTDOWN) /* We are shutting down. Don't do anything more */ - return 0; + return rc; goto drop; } -- 1.8.3.1