From: Doug Oucharek Date: Wed, 2 Mar 2016 04:08:00 +0000 (+0800) Subject: LU-8106 lnet: Do not drop message when shutting down LNet X-Git-Tag: 2.8.56~130 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=47b7b31978;p=fs%2Flustre-release.git LU-8106 lnet: Do not drop message when shutting down LNet There is a case in lnet_parse() where we discover that LNet is shutting down but we continue to use the NI when we drop the message and end up calling ko2iblnd_check_send_locked() which tries to allocate from the Tx pool which has been cleaned up already. This triggers a NULL pointer dereference. This fix just returns from lnet_parse() when we disover LNet is shutting down. Signed-off-by: Doug Oucharek Change-Id: Ia8dba848e88b02ed23e2e77adb702c7ad0e60628 Reviewed-on: http://review.whamcloud.com/19993 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index 0df68dc..cd7c0e9 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -1991,6 +1991,9 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t from_nid, libcfs_nid2str(from_nid), libcfs_nid2str(src_nid), lnet_msgtyp2str(type), rc); lnet_msg_free(msg); + if (rc == -ESHUTDOWN) + /* We are shutting down. Don't do anything more */ + return 0; goto drop; }