Whamcloud - gitweb
LU-15618 lnet: Return ESHUTDOWN in lnet_parse() 11/46711/2
authorChris Horn <chris.horn@hpe.com>
Thu, 3 Mar 2022 07:12:32 +0000 (01:12 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jun 2022 05:41:07 +0000 (05:41 +0000)
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 <chris.horn@hpe.com>
Change-Id: Ic403619c6dccf3921c46a674808c404adad7a30e
Reviewed-on: https://review.whamcloud.com/46711
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c

index e0ddf42..6a3220a 100644 (file)
@@ -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;
        }